Great job, MOM! Immediate consequences get the message across. Work with her when not in the heat of the moment so that she understands the severity of running away in a crowd. Stranger Danger talk is good but... if she is lost, does she know who she CAN turn to, in a public place?? (i.e. employee, a mom with a bunch of kids, etc.... ) Also, have you given her a special "password" that is unique to only the two of you? Even though she ran away, was she even aware of how to make it back to you? She may have wanted to run away, but then couldn't remember how to return. My kids and I always have made up a special "sound" that is just unique to us. (used to be a certain rhythmic whistle, which, when the other person heard it, they mimicked, so that I knew how to find them.)
This week, maybe one "cancelled" play date or trip to the park, with the emphasis on "why you aren't going... .because you are grounded", I think is adequate. Anything longer would be lost on a 4 year old.
Yes, a 4 year old can push the envelope very well. So can 5 year olds, 6 year olds, etc....
Yes, I have encountered this - one major trip to Target, with my children, ended in my 2 1/2-year old son, being carried out, under my arm, screaming, while my daughter, held my other hand, screaming, "NO MOMMY ... I'll be gooooood!" I had given fair warning, then I swiftly marched the two back to the car, announcing "I am done!" I left a filled shopping cart in the aisle (with stuff for them!). There was no yelling, no spanking on my part... just a swift action. I have a teen and a tween now, and it's funny that they still remember it. Your daughter knew better than to do what she did but.. with your swift consequences, she may think twice about doing it again. So sorry her finger was pinched. It does happen and don't beat yourself up over it. That wasn't your intent to have that happen.
Good luck.