Flywheels are perfectly suited for high C-ratings, which is the ratio between power and energy. Li-ion batteries typically operate at C1. That means if you want to buffer a 100 kW load for your factory machine, you’ll need a 100 kWh battery. Try getting a quote for your own peak shaving requirements using Li-ion batteries and you’ll see the problem.
Flywheels can typically operate at C20 to C200 with no charge/discharge degradation. In fact the worse and more frequent the power transients, the better they perform compared with batteries.
As grids decarbonise and lumpy power becomes more common, flywheels offer a more economical, robust and environmentally sound way of smoothing everything out than by adding yet more batteries into the energy mix.