Interference from well pump pressure switch and microcontroller
Without a block diagram showing the orientation of emitter noise cables and sensor affect signal cables, I expect you have a CM (common mode) unbalanced signal crosstalk issue.

The common solutions in general are:


Isolation: Reducing cable proximity and orientation to reduce mutual coupling.   
Shielding using twisted pair or STP cables for all external cables.
Filtering with snubbers for arc suppression of pump relay and RC caps and/or Ferrite beads to shunt noise ingress. 


Consider all noise is in AM or SW band and monitor pump start/stop with radio on a quiet channel for static noise pulse to hear it. (e.g. 550~1MHz AM)
Ferrite Chokes on cable designed for >50MHz may or may not work. 
100pF on 10K impedance helps for glitches T &lt; 1us.

Suppression: Eliminate peak AC voltage switching inductive motor arcs using 30A ZCS Triac driver or SSR module to pump motor to start on zero voltage and shut off on zero current.  Usually, 1 in 5 random start/stops will be near the peak sine which corresponds to your error rate now with Gnd connected.


If you want to try a snubber on pump relay, consider 500V film cap and ~50  Ohm 2W in-series 10nF Y-rated film cap across the relay and snubber on coil as well.
Try to keep AC cable far away from sensor cables and at right angles if close.

Grounding: Also use Earth bonded ground for CPU card 0V to bypass floating ground noise (CM Noise) to earth gnd. 


You may choose a 10nF ceramic or film cap or hardwired braid wire to earth gnd.



One or more of these methods may work in your situation until more data from you.