The market has been pleased with top memory chipmaker Micron Technology's (MU 2.92%) mounting comeback. Memory chip inventories skyrocketed in 2022 as PC and smartphone sales dropped and Micron's customers pared back spending to manage their cash during the downturn. However, as the generative AI hype has developed into a full-fledged industry with massive growth potential, demand for bleeding-edge memory has ratcheted back up. In anticipation of a multi-year run-up for Micron's sales, especially for AI applications, Micron stock has rallied an impressive 70% in 2023, and is homing back in on all-time highs.

There's just one problem: Micron is still rebuilding its way back to profitability after its massive slump in the last year. But there's another way to play the memory chip market, a stock that could be poised to soar in 2024 and beyond.

The picks and shovels of memory chips

Lam Research (LRCX 2.65%) is part of what I call the "fab five," the five companies that control the majority of equipment bought by semiconductor fabs (a facility that manufactures silicon wafers, which eventually get diced into chips). Besides Lam, the third-biggest of this group, there's ASML Holding, Applied Materials, Tokyo Electron, and KLA Corp.

Historically, Lam's equipment was heavily tilted toward memory chipmakers like Micron. At the peak of the last fab equipment spending boom (late in calendar year 2022 for Lam), memory chip customers totaled half of total revenue, and up to two-thirds early in 2022!

But as customers like Micron got hit hard by the downturn and aggressively reduced equipment spending, Lam's memory business got hit too. As of the quarter ended in September 2023, Lam's memory chip fab revenue had fallen to just 38% of total sales.

However, Micron and its peers have been indicating a memory chip bottom is in the rearview mirror -- Micron revenue was $4.73 billion in the quarter ended in November 2023, up from just $4 billion the quarter prior, and it's expected to rise again to $5.3 billion for the quarter ended in February 2024. All-time record sales are in view by calendar year 2025, putting Lam in a position to recoup that lost memory equipment revenue.

LRCX Revenue (TTM) Chart

Data by YCharts.

A big transition will continue in 2024

Of course, Lam's own rally could be lumpy. After all, Micron did indicate that while it expects its fiscal 2024 expenditures on property and equipment to be up slightly from 2023, its wafer fab equipment spending specifically could remain muted.

One reason for that is Micron is undergoing a massive expansion of its operations, particularly in its home state of Idaho, but also including a new complex in New York. Once the construction of those facilities is complete, though, they'll eventually need to line up for Lam's machines to start cranking out more semiconductors.

That said, Micron and other memory chipmakers have been repurposing existing equipment for use in the highest-demand markets, like for AI. To move and set up this equipment, a company like Lam is often tapped for help. To wit, 40% of Lam's revenue in its last quarter (which ended in September 2023) wasn't equipment at all, but "customer support-related revenue" -- like moving and repurposing Micron's existing but underutilized fab equipment.

There's also more to Lam's story than just memory these days. The company has been working on new equipment to address its growing logic chip and third-party foundry customers as well, customers like Taiwan Semiconductor Manufacturing. Logic and foundry revenue actually reached 62% of total sales in the latest quarter.

You're starting to get the idea. Whether it's memory chip or logic and foundry equipment, or the sale of new equipment or repurposing of existing machinery, chipmakers of all sorts will go through Lam (and the other fab five) for the next semiconductor boom.

Is 2024 still the time to buy?

Granted, the market has already gotten wind of the goldmine (silicon mine?) of opportunity Lam is sitting on for the next few years. The stock already rallied nearly 90% in 2023 off of its multi-year lows, and is actually making new all-time highs.

However, unlike memory chipmakers like Micron, Lam remained highly profitable throughout this last industry downturn. Management has a track record of steadily increasing profit margins over time, and though it's planning some strategic investments in 2024 that could keep a lid on margins this coming year, its long-term goal remains unchanged.

LRCX Revenue (TTM) Chart

Data by YCharts.

As of this writing, Lam stock trades for about 22 times Wall Street analysts' estimates for next year's (fiscal 2025 for Lam) earnings per share, or about 24 times expected forward free cash flow. It's a reasonable price for a company starting to heat up again with lots of demand for chip equipment needed in the years to come. Lam stock looks like a great long-term buy to me in 2024.