What is an ICEE and what magic does that machine do?

In Southern Spain in the 1990s, I remember buying (delicious) granizados, which were essentially Icees made from lemonade or orangeade. I always wondered if Andalucians had somehow developed this technology centuries ago, but Wikipedia says it’s just that some Mexicans in the 1970s borrowed the idea from 7-Eleven.

I worked (quite briefly) at a place that claimed to have “invented” the Icee, and they sold it, but they used a different name that I can’t remember.

Basically, it was “invented” by a malfunctioning pop machine. It kept the liquid too cold, but just below freezing, so that when it came out, the syrup mixed with the carbonated stuff and instantly foamed up and froze. So it was an accident but it was also a big summer hit. (It first happened in the summer, when the pop machine was apparently overcompensating for the heat. But then they did something to the machine so that it would happen on command.)

I actually think this little mom & pop place invented it concurrently with whoever called it an Icee, because they did not get rich off their invention (or accident, or whatever). Or maybe they did. It’s not like I hung around that place.