*** This is pure theory*** - I don't know how this would work for real.
Though, I think this would probably suffice your Caning machine.
Since the cane is flexible enough to move past the 'blockade'. Yet this should build up enough force (with the right tension/settings).
Was rhinking about this a single direcion could work shorten the can and use the stop as a set and at a certion point you could make it so the tower unlocks so it can slid up the ass and after that locks back in for the next rotation as for ardino u could put a slid and bolt to move the seter to and fro to make it with variable intensity