Why do people start threads asking for opinions, then dismiss or attack everyone who doesn't agree with them...you obviously thought you were in the right, so just crack on.
From the way you talk, it sounds like you follow the gentle parenting approach. I can tell you now, you're going to have problems. Every parent I know who parents this way has had complaints from nursery/school about their children's behaviour, fall outs with friends and family members who won't tolerate certain behaviours in the name of "validating feelings" and they get tuts/glares/their children spoken to in public places because of the way they're behaving. People talk about them.
And yes, I have a child too, she's also 4. I get it, sometimes they get upset or melt down, and I'd have done the same in trying to scan my things and get out of there as quickly as possible. Often, trying to stop the crying in the moment just escalates things, so it's best to let them get on with it and just try to get away fast. To onlookers, it looks like the parent is doing nothing.
I don't think you did anything particularly wrong up to that point, but it's what you did afterwards and how you're responding on here that comes across as quite entitled.
Since you asked what others would have done - I'd have ignored the woman, or said something like "Sorry?" and shaken my head before walking away, depending on how I was feeling that day. She was rude and grumpy, but there are all sorts of people out in the world, I wouldn't have given her as much headspace as you're doing.
However, I'd have spoken to my child afterwards. I'd have said something like "that lady was a bit mean but you were being very loud. That annoys people. We need to be quiet in the shops. I know you were sad about not getting a toy but we can get one from another shop". Then we'd have hugged it out and moved on.
Personally, I want to help my child learn resilience and how to function out in the world. That involves learning that certain behaviours get a negative reaction, and learning how to behave in public. Validating them sobbing and making a racket in a shop because they couldn't get a toy right this minute, then getting into a confrontation with a stranger who said something a bit cranky is not going to help them do that.
But, you do you.