I was fitting a sink for my daughter and had the situation above where I needed to tighten a brass nut at the bottom of a deep hole that I couldn't reach with normal spanners. Of course, I didn't have a socket or anything else the right size but, I did have various bits of PVC waste pipe lying around and I had a blowtorch/electric paint stripper available.
I chose a bit of PVC pipe just a little smaller than the nut. I heated the last 2 cm of one end of the pipe until it was becoming pliable but not too soft and pressed the nut down into the softened plastic (see the pictures below). The plastic shouldn't get hot enough to smoke or burn it just needs to soften. You might want to wear heat proof gloves while doing this, it gets quite hot.
When the plastic cooled I had a deep socket spanner strong enough to spin the nut onto the thread and tighten it. The seal around the waste pipe is made by a rubber ring so I only needed to get enough pressure on it to tighten the seal.
Pipe With Nut view 1
Pipe With Nut view 2
Finished Spanner
Click the images to enlarge
It saved a trip to the DIY shop and probably some pennies as well.
Maybe for other sizes of nuts or with other materials you could try something similar with a copper or other pipe by getting a pipe close to the size of the nut and knocking it into shape carefully with a hammer.