While you should never buy a stock just because it's down a lot, with so many stocks down by so much this year, there are bound to be some huge bargains out there.

When investors are increasingly worried about the short term, investors should expand their time horizon. Looking out to 2030, some marked-down stocks have businesses that are bound to be much larger in 10 years than they are today.

That could lead to market-trouncing returns for those willing to buy when others are fearful, and it's why semiconductor equipment companies Applied Materials (AMAT 1.46%) and Lam Research (LRCX -0.28%) are prime candidates to potentially triple your money over the next decade.

What Applied and Lam do

Applied and Lam are kind of like the Coke and Pepsi of semiconductor etch and deposition equipment. Deposition machines lay down extremely thin layers of material on a silicon wafer, while etch machines strip away that material, leaving the lithographic imprint of transistor materials behind. This step is repeated over and over to produce today's semiconductors.

Applied has a slightly more diverse business, with inspection metrology machines, packaging machines, and an advanced display business as well; however, most of its revenues come from etch and deposition. Meanwhile, Lam Research is an etch and deposition pure-play, and a specialist at vertical stacking. NAND flash memory uses a lot of this technology, but 3D stacking will also be used more in future DRAM and logic chips.

A high-growth industry

Since basically all semiconductors are made with either a Lam or Applied machine, or both, growth should generally track that of the semiconductor industry. The great news is that the semiconductor industry outlook is very bright, even if the next few quarters are a bit hazy.

According to a recent report by consulting giant McKinsey, the semiconductor industry is projected to grow at a 7% annualized rate through 2030 -- a much higher rate than GDP. That's because semiconductors are making their way into a wider variety of devices. Not only is semiconductor content going up in traditional PC and mobile markets, but newer applications of cloud computing, artificial intelligence, autonomous and electric vehicles, and industrial automation will all contribute to high demand for chips this decade.

If Lam and Applied's growth merely tracks the projected growth of semiconductors, a 7% growth rate over 10 years means revenue and earnings would nearly double. But there are advantages to Lam and Applied that should allow them to do even better.

A global oligopoly gives each company big advantages

The semiconductor manufacturing industry is very dynamic, but leading equipment players have consolidated the industry over past cycles, with only a few large players left. The remaining large equipment companies have such a research and development lead, and work in such close partnership with leading foundries, that they would be incredibly hard to displace by a smaller players, barring some sort of miracle technological breakthrough. Chip manufacturing is only becoming more difficult, so if you are a large foundry, would you really want to gamble on a new upstart equipment-maker?

This technological and scale-based moat should help Lam and Applied grow earnings by a greater amount than the overall industry, for two reasons. One, an oligopolistic industry tends to generate high and increasing operating margins, and this has been the case for both of these companies, especially over the past 10 years.

LRCX EBIT Margin (TTM) Chart

LRCX EBIT Margin (TTM) data by YCharts

Besides margin expansion that comes from increased scale and pricing power, there's also a case to be made that the capital intensity of chipmaking could go up. While equipment spending as a percentage of industry revenue has gone up, the operating margins of leading chipmakers have also trended up over the past decade. That means more room for designers to invest in capital equipment. Given the increasing complexity of leading-edge chipmaking, I wouldn't be surprised to see capital intensity rise.

Every percentage point of increasing capital intensity or margin expansion could mean another point of earnings growth for these two leaders.

Buybacks and rising dividends

Another attractive characteristic of these two equipment-makers is that while they provide tools for a capital-intensive process, their own capital intensity is quite low. That makes for very high returns on invested capital (ROIC).

LRCX Return on Invested Capital Chart

LRCX Return on Invested Capital data by YCharts

High ROIC means these companies can invest in growth while also having cash leftover for share repurchases and dividends. Both Lam and Applied return between 75% and 100% of free cash flow to shareholders in the form of dividends and share repurchases. Over the past five years, that has led each company to lower its share count by about 20%, while more than doubling its dividend.

LRCX Average Diluted Shares Outstanding (Quarterly) Chart

LRCX Average Diluted Shares Outstanding (Quarterly) data by YCharts

Looking at just repurchases, a 20% reduction in shares over five years equates to repurchasing 4.4% annually. If the trend persists, shareholders can still expect between 3% and 5% earnings growth from share buybacks alone.

Putting it all together

If Applied and Lam each grow earnings 7% annually from industry growth, gain another 1% from either margin expansion or increasing capital intensity (a conservative assumption), and buy back 3.5% of their stock per year, that would equate to about 11.5% earnings growth. Over 10 years, that leads to a tripling of earnings.

Of course, this doesn't even count both companies' dividends. Applied currently yields 1.2%, and Lam currently yields 1.5%. Given the high likelihood of double-digit annual dividend growth, those payments could easily put 10-year returns well over 200%, and even higher if you reinvest those payments.

Finally, there is a strong case to be made that both companies' valuation multiples will expand. Each has sold off a lot with the market this year, with Applied Materials now trading at just 12.2 times trailing earnings and Lam Research at just 13 times earnings. Assuming those multiples go to just a market average of 16, and that would increase overall returns by another 10% to 20%. Each company has traded at higher multiples than that at times in the past, so a 16 P/E ratio may also be conservative.

Sure, most investors are fretting about a potential down-cycle for semiconductor investment next year. Yet with these stocks down more than 42% in 2022, today's prices could very well end up being tremendous bargains for long-term investors.