I don't know if it would work in this situations, but a few years ago, I found a handy tool to get into areas with no room to swing a ratchet or gear wrench. It is a chain driven extension wrench made by Tite-Reach.
tite-reach.com
I bought the 1/4" and 3/8" set back in 2002 when I was fiddling with my Subaru WRX. The horizontally opposed engine puts the spark plugs right at the frame height, with zero room to move. I was using two swivel adapters and turning one notch on the ratchet at a time. Once was enough, and I splurged to the Tite-Reach set. I now have their low profile sockets to go with them, and the combination has come in handy an endless number of times.
How it works:
Extension Wrenches & Tools - Specialized for Tight Work Spaces
Tite-Reach specialty tools are professional grade hand tools that will make your job easier by reaching those hard to access nuts and bolts. Save your knuckles, save your time!
I bought the 1/4" and 3/8" set back in 2002 when I was fiddling with my Subaru WRX. The horizontally opposed engine puts the spark plugs right at the frame height, with zero room to move. I was using two swivel adapters and turning one notch on the ratchet at a time. Once was enough, and I splurged to the Tite-Reach set. I now have their low profile sockets to go with them, and the combination has come in handy an endless number of times.
How it works: