How to properly interface button switches meters away from the host
Use an RC filter like this to remove any high frequency interference.
R1, R2 and C1 should be as close to the MAX6818 as possible. Do not connect the GND end of the push button to the local ground, leave it floating. Use a shielded, twisted pair for the long cable. A shielded twisted pair is better than an unshielded pair, but it really depends on how much interference is present in the environment.
The MAX6818 has an internal pull up resistor, but it is too high (33-100 k in the datasheet) to build a reasonable RC filter, so we have to use an external pull up resistor. The inputs of MAX6818 are ESD protected, so an optocoupler is not necessary. This circuit may introduce a delay in the range of tens of milliseconds (in addition to the ~50 ms delay by MAX6818), which is not of any significant concern for you, I hope.



simulate this circuit &ndash; Schematic created using CircuitLab