The rapid buildout of energy storage in Texas — increasing roughly tenfold in three years — played a key role in helping the state avoid power shortages and brownouts this past summer amid record power demand.