As power grids add more renewable energy and large-scale battery storage, utilities face a growing challenge: how to stress-test tomorrow's electricity systems before investing billions to build them.