You will not damage the stepper, steppers can be stalled without harm, they squeal a lot

The design of the switch totally depends on the design of the hold-down, there is always room to fit a sensor or switch

Of course, if you just trust the hold down to do its job, the rest is just simple logic - "do not move while hold-down output is on", sure that can be done within Mach3