The advantage of the batteries is specifically in power density, which makes them suited for mobility and consumer convenience. But the more you get into seriously optimizing electrical storage for scale, the less it's going to be about one specific mode.
5 Hours of electricity is something like 13 TWh, so if we get to 5,500 GWh annual production by 2030, it would take ~2.5 years to provide 5 hours of global electricity storage. Handicap it all and double the electricity requirement and halve the annual production figures and it's still only 10 years' capacity to go to a 99% carbon-free grid.
Yes there is pumped storage, but I wonder how much more of that there really is to develop? Plus damns are environmental disasters of their own. The other storage methods are speculative at best. I just wanted to push back a bit on the idea that "just" need solar + storage as many people seem to believe. It is a big ask, and I think we will need more. If we don't want gas plants, then nuclear could be a good option.
My other point stands though -- even if you grant a much larger electricity demand, you can't just look at today's battery production capacity. There are pipeline projects that will 10x that by 2030 (which is what happened in the past 10 years). Even with pessimistic assumptions, you get to pretty reasonable time frames pretty quickly.
The only thing that limits battery production is demand. There will be plenty of materials available and plenty of machine-makers exist. That S will go as big as we need.