Are you really sure you want to do this?
My old Mercedes 300 SD had a similar radio antenna. The antenna would not go all the way up or down. I bought a new antenna with attached actuation cable. The service manual replacement steps said to turn the radio on and when the antenna extended, pull really hard on it so the cable pulls out of the motor assembly. That worked!
Then feed in the new cable and turn the radio off and the new cable and antenna will be pulled into the mechanism. That worked just as written.
I am telling you all this to explain there are NO stops on the mechanism, except in the actual antenna. The motor on/off it timed and the mechanism will just slip on the cable whenever the antenna stops the movement.
If you use such a device on a door, you must ensure the door has sturdy stops so the motor force will not destroy something.