The input circuit gooks good, except the TVS you've used (SM24-02HTG) is not a bidi TVS, it's a dual unidirectional one. It will work as shown, though you may be able to save some board space by using a SOD-123 packaged device instead. As shown, the optocoupler's LED is not protected against reverse voltage. There are some optos available which can accept both polarities (with back-to-back LEDs), but otherwise either include a bridge rectifier, or swap your TVS for a unidirectional type to protect against reverse polarity. Avoid the temptation to use a SOT23-3 dual diode to protect two channels - if one blows up the other could get damaged.
The output configuration does not appear correct - the drain of Q1 should not be directly connected to +24V. You could either leave Q1 just connected to DIO_OUT_1, or include a flyback diode to +24V (in case the load attached to DIO_OUT_1 is inductive).