Check out this Hazet extendable and fine tooth ratchet:
https://www.misterworker.com/en-us/...sx8tSCYPO7EvVFIvfoUMa8BBzFu-aU1xoCPRYQAvD_BwE
It extends to 616 mm (about 26") according to the link but I think it is somewhat longer than that. You can make it shorter to fit, as needed. It is fine toothed and very strong. I pull this out OR a large matco (think it is 88 line or similar) flex that is about 28" long when things are *really* stubborn. It sometimes seems the fastener breaks free in fear when it sees either of these coming

For longer handles, the ability to adjust handle length helps access. You make it the min you need to also reduce risk of breaking things. Flex can help access too with the matco but the handle is also very long and you cannot make it shorter. You can easily break off most bolts you are likely to use with these with in home & automotive applications. They are expensive but worth it. The ratchet mechanisms in both are very strong (the anvil should break first so it would not help to be any stronger). You can even put a heavy pipe on the end of of both if you really need to. But I only needed to do things like that a few times in 20 years (a stuck ~3 1/2 in diameter jack cylinder I was rebuilding for example).
If you need more than these can provide, then you should be using 3/4 or 1" drives and impact. 3/4 drive tools are also be much more rigid in terms of extensions and general handle heft for better torque transfer. But those should not be necessary unless you are working on industrial scale stuff, large trucks, agricultural equipment, etc. I do not even want stuff like that at home since it costs a lot, take up a lot of space, and will mostly gather dust with my applications. I might feel different if I owned a combine or something like that.