A flywheel can provide frequency stabilisation, or it can provide energy storage, but it can't do both at the same time.
To provide frequency stabilisation is must be synchronised to the mains (eg run at a constant speed), while to provide storage it must be non-sychronised, eg slow down when loaded, and speed up when charging.
Of course you can use non-synchronous flywheels with synchronised inverters, but then you can do that with batteries, wind-generators, etc.