Freak accident! But yes, such an imbalance can do great damage. I had that happen with my backup generator. In the purchased extension cable, a screw in the four prong 120-0-120 female socket had never been properly tightened by the manufacturer, and the wire finally slipped out. $500 to replace burned out equipment.
A capacitive sensor (e.g. as simple as a few turns of insulated wire wrapped around the insulated mains hot leads) would give a signal that AC voltage is present. That would be a very high impedance voltage source, but enough to light a neon bulb, which in turn could be used to make an optocoupler.
This is the basic idea, performed some years ago by artist Richard Box in the U.K.:
