I have the same problem on my 92 400E, the rain finally stopped last night, today is very dry, it becomes such a joy to drive, idles like silk, I couldn't feel the car running without looking at the tachometer.
But until last night, when the humidity was high, it was idling very rough, shaking and humming, when I shifted it to P or N, it got better, it always does this when it rains.
I have also replaced distributor caps&rotors, plugs and fuel pressure regulator, did help the overall performance, but didn't help out on this.
I am considering to do some serious cleaning on the Mass air flow sensor, any comments?
99 BMW 540i 6-speed 110K Km
03 SAAB 9-5 wagon 80K Km
92 400E (Sold) 245K km
Still missing the days with the Benz, it kept me busy.