Here are the downstream connections for banks 1 and 2, on my 2001 3.0i, prior to disassembly.
I took these pics, labeled them with masking tape labels, and then found when putting it back together, that I could tell just from the lengths and the bends in the wires where they needed to go.
So I'd try to figure it out that way - try to put them in their original positions, as the bends in the wires want to go, and hopefully it becomes clear.
Confirming that as you found, the connectors there are interchangeable as they are designed. One of the few (only?) things on the whole car like that.
The upstream sensors are not confusing, right?
I can see some of the colored wires in the photo there - maybe that will help you figure which is which.