Arduino Motor Control with PWM and totem pole

I don't get those figures - where does 5ms come from?

500Hz is 1ms between switches, if you take 10us to switch then 1% of your time is in switching, with 24V and 27A that means you are dissipating VA/4 or so watts for that 10us on average assuming linear current ramp IIRC - thats 162W on average for those 10us slots, so 1.62W on average across the entire waveform (switching loss). So long as the device is able to handle 160W pulses of 10us duration (there are graphs for this on most datasheets), this will be OK.

However if you want to switch faster for less noise and higher efficiency you'll want to switch faster than 10us really.

10us switching of 4000pF / 10V is several mA, so you'll probably be able to go to 2 or 3 us switching without a driver chip.

However you have to consider another issue with high power control - the output voltage swings couple back to the gate through the gate-drain capacitance, and there is a large inductance connected to the drain (fast voltage swings). This means than unless you drive the gate with a nice low impedance you could get the gate going negative enough volts to fry the microcontroller (then the MOSFETs may well blow). People often add zener diodes between gate and source to handle this - but a more robust solution I think is to drive the gate with a suitable driver (a few ohms output impedance).

And once you remember that high stall currents can flow you'll start to worry about whether the devices are beefy enough to survive a high-current excursion for long enough for the microcontroller to react and shutdown (measure the DC resistance of the motor at rest, it'll be in the milliohms...)

Basically be conservative, assume the worst, detect overcurrent, build with care and test at low power first.