Flywheel energy density is much higher than batteries, especially in space where friction losses can be minimized and there is no need for a failure containment vessel, so long as the thing is kept oriented in a safe direction (do not build space station modules that cross the plane of flywheel rotation).