Just trying to ensure you understand during troubleshooting. While the goal is eventually to care about what the string is doing, it's not primary and takes your attention away from the inherit problem. You say it cycled unit a point where the motor is still running and nothing is happening. That means that likely something is slipping in the gearbox. If it was just the limit switch, well it would mechanically stop the motor at some point if it did not sense it and electrically stop it.
Which is why I'm saying- you can basically remove the entire winding assembly and that also is what it rolls along the gantry. You end up with the motor with tire that moves the gantry left to right, and the gearbox that drives the winch. So, when you power it, you have to hit the Limit switch on the end of the gantry to stop that motor, and then it "thinks" it's in position for the next action. Then the winding drum motor spins one direction until it's internal limit switch, and then reverses direction, runs the same number of turns back up until the other internal limit switch is hit, then the motor for left to right on the gantry moves until you hit that limit switch at the gantry above the ramp. It's just keeps cycling. The string is the last thing we worry about, not the first. You work on that after you have it cycling 100% all endpoints and conditions.