Low tech methods to stand-off ESD spikes on micro controller connected to long wires

 

Digikey tutorial with som simple circuits.

 

https://www.digikey.com/en/articles/protecting-inputs-in-digital-electronics

 

For the Pi

https://blog.mbedded.ninja/electronics/circuit-design/esd-protection/protecting-io-lines-from-esd/