Yes, the whole monkey cylinder has a small arm at the bottom connected to a microswitch that intercepts the curve of the ascending chain.The roller chain forms a closed loop, Jason’s statement is correct: chain length 5 meters, stroke 2.3 meters.
The solution with a descent timer is much more practical and used.