My 2001 Honda Civic needs a new muffler every two (2) years or so, because the inlet pipe corrodes just after the union. Is this a common problem, or would installing a better quality muffler prevent this? Aren't most exhaust system components stainless steel, how is it that it corrodes so quickly?
Stainless steel is merely corrosion resistant, not corrosion proof, and some are better than others. My 1991 Toyota with 251,000 miles (including daily driving in the rust belt Winters) is still on its original exhaust (getting rusty, but no leaks/holes). My 1995 Mitsubishi with only 116,000 miles, rarely Winter driven is already on its third. This time around I spent more money and had a nice custom one fabricated out of higher quality materials... I thought the first replacement exhaust was a good one, but it rusted out in only 9 years.
I believe that the OEM muffler for the Honda Civic is only aluminized steel, not stainless steel. As such, it doesn't even have the higher resistance to rust that a stainless part will have.
As noted previously, a stainless part is only resistant to corrosion, not immune (nothing really is). If you choose to go with an aftermarket stainless part, you can visually inspect the connecting flange and welds. You want to see a nice thick piece of metal with solid welds.
My preference is to purchase a stainless replacement and use that for as many years as possible. I hate the sound that a progressively degrading muffler makes over time.
Your purchasing preferences may vary.