The main problem as I see it is that Duncan’s design connects a delicate high-impedance 5 volt microcontroller between two large antennae! The set-up is as likely to pick up static electricity in a thunderstorm as Benjamin Franklin’s kite and key experiment.
I suggest isolating the Arduino (which is tried and tested functionally) from both the track and the 12v power line.
A Model Engineering signalling system is probably turned off until the track is needed. Therefore, when the track isn’t being used, the Arduino signal units can all be physically disconnected from the power line. Can be done automatically with a relay, and the miniature 5V types common in Arduino-land should provide about 1.5kV of isolation. I also suggest bridging the 12V supply with a Gas Discharge Tube and a bi-directional Transient Voltage suppression diode. These are specifically designed to protect against surges and cost less than 50p each.
The same devices should also be applied across each section of track, hopefully limiting the voltage it picks up.
The other major problem is connecting the track direct to the Arduino’s A1 pin. A1 is fitted with an Analogue to Digital Converter with an input impedance of about 5MΩ, max input 5.1volts, so it stands no chance if a thunderstorm or sultry weather charges the track up with a few thousand volts of static electricity. The counter-measure here is an opto-isolator with an analogue output, home-made if necessary. As per Duncan’s 3-level design, the LED burns more or less brightly. It’s full on if the track develops a continuity fault. Normally half brightness by the potential divider when no train is on the track, and off when a train shorts the rails. Duncan’s code stays the same, the difference being there is no electrical connection between the track and the Arduino’s delicate ADC.

None of the suggestions, including mine, would protect against a direct lightning strike, but that’s very unlikely – Duncan would have noticed more violence. A house in the village was struck last year, and the damage was very obvious – half the chimney stack disintegrated, and about a quarter of the tiles blown off. Duncan’s signals were probably destroyed as described by Macolm due to being inside the voltage gradient between ground and a charged storm cloud. Playing amateur radio, I’ve seen sparks jump 5mm to earth from a 10 metre long wire antenna. No lightning, just static electricity. Takes about 3kV to jump a millimetre, easily generated by rubbing a rubber balloon against a woolly jumper…
Dave