Since 2002 I have owned and used 12 different digital cameras, spanning compact cameras to professional digital bodies. Of these only the first suffered a failure due to manufacturing problems - a Canon G2 with a failed flash. Of the remaining cameras, most have been completely reliable other than for my stupidity (dropping cameras, getting drowned in seawater, etc).
Most manufacturers are highly motivated to avoid problems in production, because returned product costs them a *lot* of money. Problems are mostly rare, but they do happen - Canon 5D cameras with mirrors that drop off, Nikons spraying oil on to the sensors, and Olympus with disintegrating strap lugs and inflammable viewfinders (the original E-M1...).
Leica has two problems. Their production volumes are low, and cycle times for models are long. This means it takes time for problems found in use to be reported and clearly understood - problems which are compounded by Leica's apparent lack of experience with electronic and software design.
What matters is how they respond. Leica generally stands by its product, although repair times are embarrassingly and frustratingly slow. Leica engineering is also getting better - the newer digital M cameras are finally offering reasonable reliability, even if the quality and functionality is wildly at odds with the cost of the cameras.
The M8 IR issues and M9/M-E corrosion issues are symptoms of a company that it out of its depth when it comes to digital camera design. But Leica are learning, standing up to their past errors, and newer cameras are not repeating the same mistakes.
The IR filter corrosion is a design error, period. Hopefully Leica will repair or replace the camera at not cost to the user...