All safety systems, and limit switches are just that, should ALWAYS fail safe. This means that a failure if the wiring or of a connector MUST result in a fail condition. Being stuck in e-stop nay be inconvenient but no system should ever be designed that cannot validate that it's safety mechanisms are working therefore continuity of limit switches and their wiring is a fundamental pre-run test. It's also why e-stop and limit switches should interlock directly on motor power and not rely on software intervention. You should ALWAYS require some manual action to over-ride e-stop or limit switches, usually by holding down a momentary contact switch while cycling power or performing a software reset action.