We're no strangers to supermarket meltdowns, btw - 11 years of them, usually almost (but not completely) unpredictable.
We use the divide and conquer technique that others have mentioned, though. 2 adults, 2 kids, if one melts down, one adult removes the melty kid.
The difference between us and the parents concerned is that would have agreed with the security guard and apologised for any alarm caused (with an explanation) and would have deflected any potentially destructive or frightening behaviour.
It's usually our eldest who has the meltdowns, and they usually involve lots of noise and used to involve a sit down protest. He actually loves shopping, but blue screens when something unexpectedly doesn't go quite to plan.
I think we've been lucky, mind, because there's been a couple of times when we've got an hysterical boy to the point of being a puddle on the floor, rather than a whirling dervish, and ended up with an understanding member of staff sitting with us, having a friendly chat.