If you charge or discharge Lithium polymer or lithuium ion batteries "wrong" they explode too.
I wouldn't want to be near a flywheel that stores 360 Wh of energy when it breaks.
I imagine something similar could be done. It's not like there are zero safety mechanisms with compressed air.
TNT has about 1/10 the energy density of petrol or diesel. Capacitors have lower capacities than batteries.
I'm not sure they ever explode in a bomb like way?
No different than people who have LP tanks outside their homes. Or fuel oil tanks buried in their yards. Or coal bins in their basements. Or natural gas lines coming their house. Or pretty much any other storage method except a dam for your water wheel, but even that can burst and flood your home.
Worst case with compressed air is a total disintegration of the tank, the room it's in, and the rest of the house along with the occupants.
There are things you can do to make it safer, like installing the tank at the bottom of a pool or buried under a few feet of dirt, but they add complications and expense.