You are going to need to modify a spanner wrench or get a crows foot with a flex head ratchet. Buy everything on amazon. Return what you don't need. I dot this all the time. Even multiple brands of the same tool will be slightly different.
Or in your case you might want a crows foot with an offset ratchet extension and a fixed breaker bar on the end of it all.
Crows foot
This:
https://a.co/d/j8OzHr8And the breaker bar or ratchet on it.
Hard to see exactly how much room you have so you'll need to experiment.
This is a classic 5 minute job that will take 3 days.