But there's no reason that has to be your frequency source. Any single battery installation on its own is perfectly capable of making up some frequency, which is why home power banks with island-mode AC output are a thing - or even just a traditional UPS. Doing the same with thousands of individual battery installations across the grid? You'll need some way to get everyone to agree exactly on frequency and phase, which in practice is probably going to mean getting them to agree on time to within a few microseconds, which could be done (albeit not very sabotage-proof) using GPS.