Car shaking and Check Engine after heavy rain
Hello, I will try to explain the problem in as much details as I understand.
I am talking about Mazda Protege 2002, 160k mileage.
1.5 years ago my car would die 10 seconds after start; it shaked on D (and not on N), then the Check Engine sign came and then it died. About 15 minutes later, when I almost arranged a tow truck to the mechanic, it actually got better and I drove it to the mechanic. They read the Check Engine codes and said that, in fact, it does not look right so I should drive it a bit until the actual problem comes out. I did so, and about a week later Check Engine sign came again and it turned out that it is a misfire due to old coil. So they repaired (replaced?) the coil, and it got fine.
Then in December I got the very same problem again, with the same symptoms. This time the code revealed a problem with some solenoid (solenoid 2?); the fuel was injected in too big quantities, so somewhere there was no oil at all, and it caused a misfire. So they repaired it.
But then, pretty soon, I started getting the same problem. The car was drivable, and, in fact, the problem would go away after like 5 minutes of driving. The Check Engine light would go away in 3 days. Today I got the same thing again. It shakes on D (especially when I do not press the accel. pedal) and acts normal on N. It begins to act as usual after 5 minutes of drive.
And - maybe it is important - I noticed a while ago, and today it confirmed, that this happens only after pretty heavy rains (the car is not in a carport or garage).
Could you please suggest what can it be?
The timing belt, as well as any other belts, was replaced long ago, somewhere at 100k miles. Other than that, I changed the oil frequently and kept an eye on the car.
I didn't find the right solution from the Internet.