I would make sure to add some override commands, that have the highest level "priority" in your program. This means the "stop" command, always stops motion of the winch, and also set it into ready mode, always. This should be at the top of your main, so it always checks first.