Maybe it was the untuned intake/exhaust that was mentioned in your first sentence.
1. An untuned intake will let in too much air, causing lean condition.
2. An untuned downpipe will cause you to over boost, causing a lean condition.
3. Your car threw a code during the rain because colder air is denser than warmer air. Thus allowing more air in. And we're back to #1
A lean condition can melt pistons. Your maf is fine.
Sorry about your car.