So, we had that problem with our pulley-arm. Stopping too late with winding up or down led to some serious problems like snapping ropes. And we don’t like snappy.
So we were looking for some other real world exaples that would have the same problem and our mentor showed us the 3d printer… we found it had switches to limit the movements. and they are called: [DRUM ROLL…] limit switches. So we build one in to test and adapted the software with some logic.