The only issues is where do you place the switch? If you have a part on the machine and the Z axis fails, then you risk hitting the part way before the switch. What controller is on this? If it were a Fanuc then you can edit the ladder to use the SA bit so when the axis faults out you engage the brake.