Microcontroller with a long wire for digital input
What the schematic does not show is the huge common mode 60Hz hum and how the grounds are interconnected with proximity to AC lines &amp; power line transients.

Your example is a good example of how not to interface long wires.

May I suggest in future;


prefer twisted pair
prefer balanced lines
avoid high impedance inputs
prefer matched impedances
avoid excessive LPF ( long time constants)
include RF cap to suppress transients.
use ferrite beads (CM choke)
avoid ground loop (ie. direct untapped connection to circuit)
use contact wetting circuit ( correct polarity 10uF cap across contacts that are not gold plated)
prefer coax for very harsh EMI environment.


Since many options are not avail. Do these;


remove big cap on board and move to remote switch contacts. (must)
remove 3K(1k) series resistor and add ferrite CM sleeve or similar
add small RF cap on board across input. e.g. 0.001~0.01uF or any low inductance type.
Replace 100K with 1k~10K.  
add large ferrite beads with multiple turns to both wires.  (CM filter)


With this solution, the switch circuit impedance will low impedance on closure and low impedance with elect-cap across switch when open. CM hum will be absorbed and differential RF noise is suppressed.


-pullup to same supply voltage as uC with good RF cap across chip.