I am making a circuit for a button to be far away from the circuit, about 50 meters round-trip. I have went decided to use an optocoupler to protect the uP from the worst of the outside environment and hopefully just get a blown optocoupler rather than a fried uP. The [optoucoupler](https://www.onsemi.com/pub/Collateral/CNY17F4M-D.pdf) will be driven by a [constant current IC](https://datasheet.lcsc.com/szlcsc/1810010523_Infineon-Technologies-BCR401UE6327HTSA1_C152631.pdf) to 10mA.

I have made a minimal schematic of both configuration.

[![enter image description here](https://i.stack.imgur.com/TFiaf.png)](https://i.stack.imgur.com/TFiaf.png)

What would be the difference in choosing high or low side configs? I am not particular in which offers better response time since a mechanical button can only be pressed very few times per second (but I am keen to know which one offers better response time). I am more concerned about which configuration is less susceptible to failure such as ESD from let's say a worse one, lightning. I went ahead and placed a TVS diode which should clamp at around 40 volts, the highest the CC IC can handle. I should probably increase it a bit more to make sure not to conduct so that the LED won't turn on.