Your pup is at an age where they'll be teething, too, so will mouth more than usual - but having said that, although you say they "love children", you do run the risk of that changing if you continue to put them in stressful situations where strange children "mob" them all of the time. You were absolutely correct in trying to get the children to let go of her (which you already know), but maybe not forceful enough for fear of causing a scene?
My late Spaniel used to enjoy strolling with me to collect my then-primary school-aged child at the end of the day (he also went in the morning, but we had absolutely no problems with that stroll!), where we'd wait outside of the gates for him to be released. Other dogs and their owners did the same - there were maybe 4 or 5 of us with various breeds of dogs patiently waiting. I was absolutely horrified by the amount of toddlers/pre-school children who would launch themselves, face-first, at my dog and either bear-hug him or hang onto his ears. Every afternoon. It got to the point where I was telling their oblivious parents to wise up and educate their children, because if my dog bit them... it would be their fault as the child's parent, not mine - and certainly not his. The children all ignored the Labrador, the poodle-cross, the Staffy... because my Spaniel looked friendly, and cuddly (he was a bit overweight, in fairness) and sad.
Except my Spaniel had been brutally teased as a puppy by a group of young children who would bang on our fences to make him bark, or play "knock-down-ginger" on our front door. He adored my children, but wasn't so fond of other children. Yet I trusted him not to bite them. He'd look at me as if to say "can I just have a little nibble...?", but he tolerated it because he knew I would remove the toddler hanging off his ears, or death-gripping his neck - physically, if necessary. He trusted me to put his welfare and safety before that of a spoiled toddler with a parent more interested in their phone than in parenting them.
Why did I continue to stroll him up to the school if I knew this would happen? Because he enjoyed it. And I don't see, even years later, why well-behaved dog should be deprived of something they enjoy in their latter years, because of badly-trained children. Plus, I'm not afraid of making a scene if needs be to protect one of my own.
The children's mother in your case was acting appropriately. Her comment of "well, that'll teach you" suggests that this wasn't the first time her children have done this, and that she's trying to get them to stop. Puppies are, however, a lure - as are the friendlier looking breeds, I'm afraid, and unless you pick your puppy up and hold them (which isn't a feasible long-term plan), you're simply going to have to get more strident in your "please leave my dog alone!" responses. Any dog can and will nip or bite to protect themselves if they feel threatened. It doesn't matter what age the person they feel threatened by - it's a primal response. But if your pup feels safe with you, and grows to trust that you will step up to protect them as/when needs be... they'll take their lead from you.
If only children could be the same...