@SKleefeld this is so cool
there are minecraft mods that add gear blocks, that behave somewhat like gears. create and crossroads
in create, alternating directions regularly i think would need either some redstone and some precise timing or a magical block that turns input rotation into arbitrary sequences. and the former would need precise timing because instead of jamming, create components break when exposed to contradictory forces.
in crossroads, you can get a bit closer to this; you can have two gears that rotate a third gear in opposite direction, and have exactly one of them have gears (and thus connect to the output gear) at a given time. still sort of magic-y, though.
in nodecore, which is not a minecraft mod but rather a completely different game, you could probably build, not quite this since gears have a fixed size, but something similar. because the gears there are made up of fungible components, you can actually customize them yourself instead of relying on built-in special cases.