I know there's a lot of energy lost in friction, but why would big heavy flywheels not work? You simply put energy into spinning up the wheel when there's a surplus, and then slow down the wheel by taking energy out of it again when needed.