You can find BMW Electrical Troubleshooting manuals for both an M50tu car and a 96-98 MS41 car, which will have detailed pinouts for the DME connector (X6000)
The M52/S52 connector is slightly different than the M50. The "Hook" on the connector housing (opposite the latch) needs to be modified to clip together.
I only know this because I used an M50 connector on a bench flasher for the MS41 ECU. It seems like the large and small hooks are flipped top & bottom to intentionally prevent insertion of the wrong ECU.
This connector is now somewhat loose, but you may be able to clearance the hook less aggressively and have it work?
For repinning, you can undo the small screw on the back of the connector, and separate the off-white translucent inside from the black housing.
The off-white part is a few pieces clipped together.
Looking from the front of the connector, you can see two vertical seams, one near each end.
Push the raised middle lip down and it should click down 1~2mm and now the pins should be depinnable with a flat depin tool.