Dealing with 12V signals spiking to 40+V

Possibly simpler than Zener:
Input02.png