Can do but not recommended...
An eStop is a kill switch... to best to implement by hardware ie relays or supplies that the eStop can disable...
had a project where I had to implement a eStop as part of the system.
the eStop when triggered would kill power to everything
on the electronic side I had my arduino outputs go thru a tri-state buffer that would be diabled if the eStop was triggered.
I also had the eStop signal as an input to the arduino.
That way any output from the arduino would be stopped by the tri-state buffer as soon as the eStop is trigerred while the arduino would then detect it (which maybe a little later ) and safely end its program.
but then again if you are killing power to everything... are you not killing the power to the arduino as well?
in my case that did not happen as it was powered/connected to my laptop an acting as and interface to my motor drive