Q:

How to properly interface button switches meters away from the host

I plan to place some buttons at about 50 meters (roundtrip) away from the host and I'm not sure if I'm doing it correctly.
The I/O reading the signal will be from an MCP23S17 16bit GPIO expansion IC that will be connected to a MAX6818 octal switch debouncer which basically handles the debouncing of the mechanical switches and at the same time offers ESD protection. They will be powered by 3.3 volts. The wire will be stranded 14 gauge wire and I will also twist them to at least make it less susceptible to inteferences.
I have come up with two ways, but if you know a better way please do say.

The first one is to just straight up connect the wires to output of the doubouncer with a resistor. I'm not sure if the resistor is necessary, but I guess to help with the ESD strikes since a 50meter 14guage wire only has 0.016 ohms of resistance which some may consider already as a short.
The second one is from a article I read, with the use of optocouplers. Although I think this is a safer solution, I am not sure if the added optocoupler and another power supply can justify its benefits because what I think the optocoupler is used for is to prevent ESD strikes but the  MAX6168 already has a ESD protection built into it.
Please share to me you thoughts on which configuration should I take, or if you have a better configuration.

A:

I plan to place button at about 50 meters (roundtrip) away from the
host

The chip in question: -

The spec for the chip is insufficient to provide protection against indirect lightning current surges and this is likely to be a problem with 25 metres of unshielded (or shielded) wiring (inside a home or outside).
Given that the inputs can exceed the power rails by +/- 25 volts, you might consider using appropriately rated TVS diodes that can withstand IEC 6100-4-5 indirect lightning surges.
$$\boxed{\text{OR}}$$
Use an opto-isolator (but don't forget the pull-up resistor on the collector).

