It seems pretty simple, in regard to what is wanted. "Stability," would mean that its main angle of force isn't being moved around by other angular forces. The TRT applies since the device is in space and isn't attached to a larger object like on Earth or similar non-moving base structure. Despite that, TRT applies to anything spinning really, it is just that it is negated by being attached to something else. This is because, in reality, you can't negate all forces of angular momentum due to everything else in existence affecting it (gravity from planetary bodies, solar wind, GCR, starting point inertia, etc.) Obviously, which of the two devices in the OP would flip, flip first, or flip at higher frequency?
If A only had two flywheels spinning then it'd more than likely start flipping quickly and often. Since it has multiple and they are rotating opposingly every other flywheel then it will be far more stable. Though, it may still start to flip.
B on the other hand has everything spinning one direction, expect the black axle, which must be spinning in the opposite direction. I assume the mass of all the flywheels is more than the mass of the axle. Thus, I believe that B would start flipping before A and would do so at a higher frequency.