Yeah the beefy resistor is quite out of place, but it's also a tiny fraction of the solenoid's power consumption, so, it's really quite meaningless in terms of overall efficiency. Fun, huh?
Speaking of totem poles -- I would go even further, and recommend a 2-switch configuration:
https://e2e.ti.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-07-88/2450.Capture-6.JPGI
would... but it is more complicated, and it's not necessary here. So, this is just FYI.
Anyway, say you were to use this -- the advantage is, you have two transistors, with respective clamp diodes, all right there on the one board. The transistors switch each end of the solenoid, so when they turn off, one end flybacks up (pushing into +V) and the other end flybacks down (pulling from GND). You need a bypass cap to account for the sudden reversal (going from a +40A load, to a -40A return), but the turn-off is as fast as turn-on (faster, actually) because it's applying the full 26V, in reverse -- rather than shorting it out with a clamp diode (at ~1V). And, all the energy stored in the solenoid is returned to the power supply -- not that that's a problem with a slow cycle like here, but it can be valuable for high speed driver applications (like print heads and injectors).
Tim