Calculation MOSFET max current needed for PCB + pulldown calculation?
The 10k resistor is to ensure the mosfets are turned off during reset. In normal operation the gate should be actively driven high or low.
The IRll04 is a n-channel mosfet. The source goes to 0V, the drain goes to the load -. 12V goes to the other side of the load. To have it work as you've described requires the gate to be higher than 12V to turn it on - this would be a challenge with the ESP32.