Seems reasonable - that is what caps do - store potential! That's why the totally fried gasket and black drool! Glad the cap cover held, otherwise, might've been a trip to the ER or worse!
I have the exact same pump, and mine blew the original cap after about 18 months. It wasn't nearly as catastrophic of a failure as yours. I would certainly follow the earlier advice to hit up pentair for a replacement pump. Good thing nobody was injured.
Electrical explosions are no joke, 7 times faster than dynamite. Looking right at it when it blew could cause serious eye problems. The flash you saw was only a tiny amount of the light energy that the arc created. Just for kicks, go see an eye doctor.
Just those pics is enough to make me wanna put steel plate between the pump and the house. You got lucky in more ways than one with that "incident".