The problem on Gemini 8 was caused by an electrical short that caused a roll thruster to stay on. It was difficult to diagnose because it happened when the spacecraft was not within range of a ground station, hence there was no telemetry. Had there been telemetry, mission control could have told them immediately that thruster #8 was stuck on.
Today there are TDRS relay satellites so all crewed spacecraft are never out of communications.
A secondary cause of the problem was the attitude thrusters (by design) still had electrical power even if the thruster electronics control system was turned off. Removing power from the thrusters themselves required turning off circuit breakers. After Gemini 8 this was changed to de-power the thrusters if the control system was turned off.
The Gemini 8 incident took place over roughly 18 min. The problem began slowly since the stuck thruster was on the spacecraft which was docked to the much larger Agena vehicle. The total mass damped the motion.
Due to a long history of previous problems with the Agena the astronauts were mentally conditioned to suspect that as the first cause. Thus when they managed to reduce the rates to about 5 deg. per sec they undocked. Unfortunately this made the problem much worse because the stuck thruster started rolling the smaller spacecraft faster, reaching about 300 deg. per sec. About 2 g of negative g (toward the head) was reached and this was sustained for several minutes. They were not at risk of blackout or “red out” but vertigo was an issue.
They couldn’t blindly shut down all reaction control circuit breakers because that would leave them with no control to reduce the spinning/rolling.
They finally activated two separate reaction control systems in the spacecraft nose and managed to bring it under control, then deactivated all the OAMS circuit breakers. When slowly activating those one by one they determined thruster #8 was stuck on.
The two RCS “rings” used to get control were designed only for reentry use and they exhausted 75% of that fuel. The remaining 25% was safe to control attitude during reentry but mission rules required an immediate deorbit.
Attitude control is absolutely critical in any spacecraft. Even back in Mercury and Gemini they knew this and there were multiple redundant control modes and backups.
Apollo was similar. On the Lunar Module the RCS system was divided into two separate groups, each of which had separate propellant tanks and plumbing. Besides this there was physically separate backup wiring to physically separate control solenoids on each thruster. This was only activated if the hand controller was pushed to the limit, the so-called “direct” mode. So if both primary and backup computers failed and if half the RCS system failed, they could still control the vehicle.
Unlike the Command/Service Module, the Lunar Module could cross feed propellant between the main engine tanks and the RCS system. If somehow both RCS systems became depleted of fuel, this could be supplied by the main tanks. Or if during ascent from the moon the main engine shut down early, they could run all four RCS thrusters using the main engine propellant. These produced about 11% of the main engine thrust but if run long enough they could compensate for a significant main engine under-performance.
So they spent lots of time thinking about contingencies and building in safeguards and redundancy. Presumably any future moon mission would do likewise.