If you want to use your endstop as a emergency stop you can re-purpose them at the end of the homing file to act as an estop. Just be sure to set them as endstops again at the start of homing.
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m581-configure-external-trigger