I suggest you do a search on the forum for items related to headlamp wipers. I saw one recently that had photos showing how to repair or replace the headlamp wiper motor. The point I remember was that there was some note about reassembling the motor assembly correctly or it would run backwards. It had to do with a mechanical assembly step, not a wiring issue. So if my recollection is correct (no guarantee there!), it may be that someone disassembled your wiper motor and reassembled it incorrectly.
1992 300E with ASR
35 years of Diesels until now!