It's possible that your AFM is good and the DME output stage is dying. If the DME output stage is supplying improper voltage, critical sensors like the AFM, CTS and O2 will return inaccurate resistance to the DME logic and the fuel mixture could be wildly out of range. I'd be tempted to run the car with a wideband O2 or dyno instead of just guessing or blindly replacing parts.
Your info about the mechanic is a good clue. The A/C unit puts a drag on the motor that the DME compensates by raising the idle speed. Personally, on older cars, I'd just adjust the throttle body stop so it was slightly open at idle. But this version of DME will compensate for an air leak like that. So the easiest way to raise idle is to adjust the AFM clockspring tension. Is it possible that he took the AFM apart to "calibrate" it manually? I'd guess that he decreased the spring tension a notch or two to get the car to run a little richer. So your AFM might be sending a signal that's too high, running the motor too rich, and choking it out.
Unfortunately, I couldn't find any pictures of a stock M42 AFM clock spring. I also don't have any stock AFMs that have been cut open to determine the stock setting. There are a bunch of YouTube videos
like this one and
this one that might be helpful, but YouTube is such a risky place. I'd strongly recommend marking the position of the clockspring & taking some pictures before making any changes. It's really easy to set those really wrong.
I'm also pretty sure that the Euro AFM is different than our NA unit, so my advice might not even work for you. In markets that didn't require catalysts, BMW kept the CO adjuster potentiometer. Our cars are all catalyzed, so the CO pot isn't installed. BMW made it easy: a single wire on the firewall harness must be connected to "enable" the older CO pot AFM. It must remain disconnected for the O2/catalyst DME versions.
Quick theoretical description:I'm no expert, but if I understand the Bosch system correctly, the "output stage" is half of the DME. There are two parts to the DME - logic and output. The logic section has the CPU and chips; it's very low voltage and cannot handle much current. So the logic section "drives" the output section to directly control the motor components. So the output stage controls signals to the AFM, ICV, O2 sensor, coil drivers, etc.. Many of those components require a very clean & stable power supply. So the output stage also supplies a highly accurate 5VDC voltage and floating grounds to cut down on RF.
Older DME actually used two discrete boards, but the newer ones in our cars only have a single board. They're a little less reliable but much more efficient. Here's an older one from my collection:

Logic board is to the right, connected via ribbon cables to the output stage. You can see how much larger the components are on the right-hand output board. This is an M30B35 European DME (011).