Huh, the flywheels discussed here are charged/discharged electrically. I would have assumed that part of the point of a flywheel would have been to make it mechanical rather than electrical! Is electrical more efficient? Or just easier to build?
Such gearboxes aren't really a thing (at least not without massive caveats).
The best you can do is fixed gear ratios and a clutch, or a CVT and a clutch to handle the ends of the range.
Both are mechanically complex and not very efficient (a typical shift under load with a clutch wastes half the energy into heat in the clutch material).
Compare to electric, where a 'gearbox' consists of software/inductors/capacitors/switches, and you can effectively have an infinite ratio (software) gearbox.