Id of asked them why at every stage. They are required to explain reasons for searching etc
making you take your shoe off in public is probably borderline against the rules too

theres supposed to be strict rules on what clothing etc they can make you remove in public and what has to be done in private to protect YOUR right to dignity etc etc.
I certainly would have initially demanded "why" when they ordered you to stop.
Also they grabbed your wrists which is restraint, and they have to have good cause to restrain people.
Had you been a crook they would have known the second they pulled on pavement as youd have legged it
They seem to forget that WE pay thier wages and are thier customer too. Theyve no good reason in the case youve described to not treat you initially with a bit of respect and change thier demeanour based on your reaction.