Dear friend
You did Almost right.
The grey/yellow/green cable or Grau/gelb/gruen in German cable certainly goes to one of the available “N” post on the main light switch, to let the function fog lights to work. I refer to the fog light bulbs “E” on diagram attached which are integrated to the main front light assemblies.
That function uses that grey/yellow/green cable as the feed hot line which comes from fuse no.8, and passes it to the grey/green cables to feed integrated headlight assemblies fog lights “E”. See diagram attached.
On the other hand you can install a set of auxiliary round nebelscheinwerfer (auxiliary front fog lights) which are usually installed next to main headlamp assemblies and those are driven with an auxiliary wiring harness, which needs a power from main light switch to be activated.
Those two black cables are, as you said, the feed lines to the auxiliary fuse box you found on the engine bay next to fender.
There are many possible ways to connect that auxiliar fog lamps harness.
THE HANGING BROWN CABLE SHOULD ONLY CONNECTED TO GROUND, NOT TO PORT 57
Manual says that port 57 is not in use because that port is for connecting auxiliary fog lights.
The connections should be this way:
1. Two black cables which end on the auxiliary double fuse box found on engine compartment, go to port 57 main light switch.
2. Ground cable brown hanging, to any suitable ground post. Screw it to any metal part that has ground.
3. Grey/yellow/green as already done go to port “N”
I guess that that hanging ground belongs to a relay installed somewhere, you have to dig further, and I also guess that it relates to an auxiliary relay used to drive those auxiliary fog lights.
A relay normally has 4 post which connect this way
1. Port 85 of the coil goes to ground, it may be that hanging brown cable you have
2. Port 86 of the coil goes to the 12V trigger line, I mean the signal which makes the relay to close its main circuit and let the current pass trough
3. Port 30 goes to the hot side, for example that could go to the output of the fuse holder already mentioned.
4. Port 87 is the switched side which goes to the accessory you are switching on and off, in this case to the aux fog lights.
On main light switch the port 57 is energized only when the switch has passed clockwise to position 1 or 2 and you pull it. So when light switch is pulled out, that port has energy.
You have to dig further and see if there is any other relay there
Best regards
Leo