As for the engine wiring harness, did you look at different areas of the harness? You can cut open the black fabric covering of the harness to inspect the condition of the insulation. The only place to inspect without cutting it open is at the injectors.
There is a 100% chance that your wiring harness is already bad, or is in the process of going bad. All wiring harnesses (at least in the U.S.) on all M104 engines are bad due to defective insulation from 1993-1995.
I don't know how you can ever rule it out as a source of your problem unless you replace it.
By not taking care of it now, you are only putting off the inevitable.
2001 E430, Bourdeaux Red, Oyster interior.
1973 280SE 4.5, 170,000 miles. 568 Signal Red, Black MB Tex. "The Red Baron".