Dams don't double as energy storage in the same way as batteries. Their rate of recharge is limited by precipitation. You can't run a dam turbine in reverse and fill the dam with excess power (you can with pumped hydro, but we have way less than 5 TWh of that). The best you can do is totally shut them off and let them refill. And in reality, dams have to constantly release a minimum amount of water to avoid creating a totally dry riverbed.
Also my battery assumptions were missing the fact that the world already has ~5TWh of hydro which can be used as a battery (even when not pumped hydro by releasing only when you need power).