Just doing a bit of back of napkin math.
Let's say over the next few years/decades renewables+batteries because economically attractive, and we transition over 20 years to a system that supports a stationary storage buffer of about 5% of daily energy usage.
Using 143,851 TWh/year from
World energy consumption - Wikipedia, the free encyclopedia
143,851 TWh/year = 394,000,000,000 kWh/year * 5% = 19,700,000,000 kWh stationary storage
Let's say that storage is introduced at a steady pace over twenty years, then each year there's a demand for 985,000,000 kWh stationary storage. Let's say they've streamlined the supply chain with multiple gigafactories, and have a $50/kWh cost vs $125/kWh pricing.
$125 kWh x 985,000,000 = $123 billion per year revenue
$75 x 985,000,000 = $73.9 billion per year in gross margin
Of course, it's going to be production constrianed to the ability of Tesla to scale up to this. But like Elon alluded to before, if stationary storage becomes economically attractive the
demand will be quasi-infinite for decades.