Before I figured out how to "deal" with them, I'd always just run by and pray. I didn't know how it worked, so much as I realized I was being pickpocketed, so I never got my stolen stuff back, but for the most part I never lost anything major. But, once I figured out that this worked, I would always enter combat before walking into an establishment, run in with 1 AP remaining, then exit combat, and never get pickpocketed. Clear abuse of the game engine, sure, unlike the punching option, but I rather liked that.
Makes me wonder... if you have the RP installed and you get the Orphanage set up with Mom's help, BUT before you get that done you punch them to discourage them from robbing you, will they still flee on sight if you visit the Orphanage later? That would be tragic, yet amusing... XD