OK, the real problem may be you trying to shift while the chain was under heavy load. Yeah, the newer chains/shifters/cogs are supposed to be able to handle that. Maybe. If you tried to shift from a smaller to a larger rear cog in order to downshift under load, that's almost certainly the problem.
FWIW, I had to learn that the hard way, too. Now by habit I never shift small-to-big (chain ring or cog) under load.
As for being scared of this happening again, you just survived what's pretty much a worst-case scenario.