Your idea with home switch wouldnt work as far as I can see. A home switch is used for homing and that is all, it doesn't prevent the axis from moving if it is active and Mach only pays attention to it when you are doing a homing move, all other times its ignored..
You need to put the input into Mach and either have a brain look at it like Terry has said or have your M3/M4 macro do the looking, either of these will work.
No problems with swapping computers or users in the future as long as you keep a backup of the brain/macro for future use.
Hood