struggle until you're 100% out then escape you'll use stamina each time you do this as well and you can struggle even while getting fucked just more of a chance you fail and you lose progress
if you run out of stam you can rest for a bit to regain stamina
or you could simply go back to a save point where you weren't in the stocks if you enabled auto save it will be the beginning of the day