a giant flywheel for every town!

Pumped Hydro is a pretty safe storage method using preexisting technology if you have hills in the area.

www.youtube.com/watch?v=_PH0IJ-_qOI

What is Pumped Hydro

YouTube
Apparently you can do something similar with sand if you live in a desert.

Thermal sand batteries are a thing, I think?

That was some solution talked about on Undecided.