In case you don’t already know, that concept has a name: Fly Wheels (wiki link: https://en.wikipedia.org/wiki/Flywheel ).
One of their main problems is that, as you pump enough energy into them to justify their cost compared to other storage mechanisms, the spinning mass becomes more and more of a danger if it ever breaks loose. Not to mention the gyroscopic effect making a “fully charged” fly wheel very hard to safely move.
… So that infamous impending collision with Andromeda will take our spirals away?!
(Impending in a cosmological sense, so several million years at least IIRC)