The assembly on the throttle plate is a known failure area. I would try to rule it out before replacing the DME. I have seen almost no reports of a validated DME failure, but there have been some on the the throttle position assembly.
Ed in San Jose '97 540i 6 speed aspensilber over aubergine leather. Build date 3/97. Golden Gate Chapter BMW CCA Nr 62319.