The “rigging mechanics” tutorials can be very helpful in situations like these, which I happen to deal with a lot. Usually, the idea comes down to two parts:
- Rigging the motions that need to occur to create the actual movement.
- Rigging the “other” parts that, in the real world, would be driving the motion.
For instance, rigging a reciprocating steam-engine. In real life, the back-and-forth motion of the pistons drives the crankshaft which drives the wheels. But in CG, the opposite is done: the wheel turns, and it pulls the mechanism along with it, using an armature to control the motion of the crankshaft and empties (with XYZ-limited track-to constraints) to keep everything properly lined-up.
In the case of this mechanism, the primary movement … to be controlled by one armature … is the folding of the gear itself. The motion of the “little thingy in the middle” would be controlled by a second, and an Empty … the Swiss Army® Knife of all such rigging … provides the precisely-placed thing that various constraints will point to. The movement of this “thingy” is described in terms of the coordinate-system of the combined object. Although in real life this might well be a “driving” part of the mechanism, in CG it will be a “driven” part.
The Rigging Mechanics tutorial, although written long-ago for Blender 2.31, is still definitive. It demonstrates how to create a hydraulic mechanism complete with flexible hoses that flex. Although some of the user-interface fine points have changed (considerably …) since then, the basic principles have not.
Incidentally, Blender now has another very useful trick up its sleeve now: drivers. These are F-curve driven (“IPO curves” …) connections between some attribute(s) of one object that can be used to control aspects of another. Now that Blender can “animate anything™,” that is to say, it can animate any attribute that you can set, this capability has pretty-much limitless versatility when it comes to “rigging mechanics.” Yes, sometimes the easiest way is to deal with the mechanical beast as multiple things, and then use drivers … finely adjusted by hand … to get plausible(-enough) movement of the whole. Stuff that a Victorian engineer would have to deal with using complex, often-hidden gearing, you can just do with a driver.
Nevermind how a mechanism actually worked. You don’t have to simulate that. Look at each of the individual motions and break them down.