I think you can monitor if the string is in tension with the motor current. When its gonna rise too high the you will know the motor have difficulty rolling the string back which means its already on high tension. If the current is low it means the motor can roll it more and tension is not high enough.
So, case one, the object is in position, roller not working, it might periodicaly try to roll the string back to, if the object is anchored somewhere the current will rise too high and the motor will be shut down . When you go to right hand side the periodic check will see that the current when starting motor is not rising too high so it will start rolling it untill the string is tensed and current again is too high which means the motor has to be stopped.
In case two same mechanism can be used to roll the string back (if current to high, the motor is blocked, no more rolling back) and the MCU will check periodicaly with motor if the string can be rolled back more. During the peroids where there is no check there will be moment when there will be no voltage on motor allowing for free rotation, its a moment for possible moving the object to left.
The motor circuit will need some control and monitoring to prevent shortcircuits and stuff when motor will be driven by MCU and when you will unroll the string forcing motor movement (generating current).