I have totally been there, done that...As a matter of fact, am still in the midst of it! You are not alone!
I always preface every playdate/outing/trip to the mall/ etc. with a small "we are going to do x now. But when mommy says it's time to go, we have to go." Then I say again, "whhen mommy says it's time to go, we have to..." and my dd fills in the blank, "go." Then I say what we will do later, "maybe when we get home we can play with your kitchen set!" I send dd off to play. When time is coming to a close, I warn her by saying. "soon playtime will be over. We have a little bit of time left, would you like to... before we go?" then I direct her to an activity I know she really likes. When it is time to go, I say "would you like to leave now, or go down the slide one more time and then leave?" (or whatever activity will take relatively little time.) (I shy away from the whole 5 minute, 3 minute, 1 minute thing, because a child of that age has little idea of what time is or how long a minute really lasts!) Once she does that I say, "ok. Mommy says it's time to go. We have to get home and play with your kitchen set!" This approach usually works. If a tantrum starts, I can usually get it under control by getting down to her level and saying "I know you are upset! You want to stay and Mommy says, 'time to go!' That makes you mad! Mad! MAD!" (Basically mimicing her emotions and repeating back to her what she is feeling so she knows she is being heard.) I may have to repeat this once or twice, but once she calms down, I can say "I know 'childs name' wants to stay and play. But now it's time to go home. Hey! Let's sing some songs as we walk to the car!"
In our house hitting is unacceptable, as it is in most households!! My response would have been to immediately put him in the stroller, like you did, and then say, "You are angry! and frustrated! You don't want to leave, so you hit mommy! " then I would have said more quietly "hitting is never ok. When you are angry use words to tell mommy how you feel" Then give examples of what he could have told you. The immediate consequence was that you are leaving the play area and he was not permitted to walk out but had to sit in the stroller.
I find that kids just want to be heard. quite often, they (and their desires) get lost in the shuffle of what is on our to do lists. How do you feel when a person you are arguing with just keeps saying the same thing over and over without even showing any recognition that they heard or understood what you said. I really try to keep this in mind although it is a daily struggle.
Also, I find people stare at you no matter how you parent your kids! Pay them no mind...either they don't have kids or don't remember what it was like to have one demanding toddler and an infant at the same time.
I'll get off my soapbox now.
Hugs to you... It's doesn't get easier (as once this struggle ends, a new one will begin), but you'll get stronger!!!