That would work fine.
You would only need to connect the switch to the enable input.
Are you sure you want to use a PWM controller? Normal for a stepper drive would be a stepper speed controller some of these also have an enable input that you could connect to your switch.
An example, not a recommendation: https://www.ebay.com/itm/38375049481...4AAOSwZVlXqa9~