Industrial conglomerate 3M Company (MMM -1.05%) has outperformed the S&P 500 for the vast majority of the past two decades. However, the stock has declined since 2018; growth has slowed, and high-profile lawsuits hang over the company's head.

It's a potential turning point for investors who must decide whether 3M's best days are gone or if the past several years are a temporary bump in a multidecade story of success.

Here is how the stock has fared against the broader market over the years and why the future could be brighter than its recent past.

A tradition of beating the market -- almost

Your mind often gives more weight to recent events, which could help explain why Wall Street is down so much on 3M stock. However, the company has a long market-beating history; you can see below how 3M stock has spent just about the entire 23 years outperforming the S&P 500 -- only very recently did the market catch up.

A $100 investment in 2000 would be worth $436 today (including dividends), roughly the same as an investment in the S&P 500 during the same time:

MMM Total Return Price Chart.

MMM Total Return Price data by YCharts.

3M has had a formula for success; it's a highly diversified industrial conglomerate that sells thousands of products, including adhesives, films, safety equipment, office supplies, and so much more. The company's steadily grown; earnings-per-share (EPS) has averaged almost 5% annual growth over the past decade and continually raised a dividend (64 consecutive years) that investors could reinvest to buy more shares.

A laundry list of problems

In 2018, that $100 investment was worth $920, so what brought shares down to the S&P 500's level? 3M's execution has arguably fallen off a bit in recent years; the company's spent nearly $10 billion on acquisitions since 2017, bucking a tradition of innovation and product development that drove efficient growth. 3M's cash return on invested capital has fallen by 24% over the past five years. In other words, a dollar invested doesn't return cash profits like it used to.

Additionally, the company faces some big question marks today. It's battling various lawsuits related to earplugs it made for the military and alleged PFAS chemical contamination. These legal issues have cost 3M hundreds of millions of dollars and could potentially cost more depending on how they're resolved.

3M Company is an industrial company; add worries about the broader economy to an economically sensitive business with legal concerns, and now we're getting somewhere. Management is expecting a hit to profits this year; 3M guided non-GAAP (adjusted) 2023 EPS of $8.50 to $9.00 versus $10.10 in 2022. That includes additional headwinds from declining N95 mask sales, unfavorable currency exchange rates, and divestitures.

Markets can pile on, sending stocks soaring when investors are greedy and plunging when they're fearful. There's a lot more bad news than good news coming out of 3M in recent quarters, so here we are.

Why the future looks bright

It might not feel like it, but the economy should eventually rebound; 3M's business could bounce back when that happens. The lawsuits are an unknown variable and could cloud sentiment over the stock until they're concluded. The lawsuits are serious, with over 175,000 plaintiffs in the hole plug suits alone. A large enough fallout could force 3M into making some hard choices around its dividend, depending on how much the lawsuits ultimately cost. But if you're ok taking that risk, the stock is tremendously discounted to account for that.

You can see below that the stock is trading at roughly half the price-to-earnings ratio (P/E) the stock has averaged for the past 10 years. At the same time, the dividend yields more than in recent memory -- nearly triple the yield compared to just four or five years ago. At an annual sum of $6.00 per share, the dividend is about 66% of the guided 2023 EPS, a manageable dividend payout ratio.

MMM PE Ratio Chart.

MMM PE Ratio data by YCharts.

Analysts believe that 3M will get back on track, estimating that EPS will grow by 9.5% on average over the next three to five years. Even if 3M falls short of these estimates, the stock's valuation is so cheap that a market upturn or favorable outcome in its lawsuits could lift 3M's valuation, supporting investment returns. Nothing is promised, but it looks like the stock's already taken its punishment (at least most of it). Perhaps it's upward and onward moving forward.