Apple's (AAPL -0.35%) stock is up 40.5% since the start of 2023. Investors have bought into the idea that its product sales (principally iPhone) growth would improve after a temporary lull, backed by ongoing strong growth in its higher-margin services revenue. That thesis worked out just fine, and there may be more room to run with Apple stock. But why not start to look at companies that supply Apple with the technology to manufacture its products, like Cognex (CGNX 2.06%)?

Why Cognex's stock slumped last year

Cognex sells its machine vision solutions to three main markets: Consumer electronics (where Apple was previously named as a significant customer), logistics (e-commerce warehousing), and automotive, alongside many other industries, including healthcare.

There's a reason why Cognex's stock is down 16% since the start of 2023, and it comes down to challenging conditions across all three of its end markets. Cognex's revenue declined by 17% in 2023. "About half of our 2023 revenue decline was driven by two large, long-standing customers who reduced their spending after heavy investment in prior years," Cognex CEO Robert Willett said on the last earnings call.

Cognex tends to be tight-lipped about customer relationships, but if I had to guess, I'd say these two consumer electronics and logistics customers are Apple and, quite possibly, Amazon.com. Meanwhile, its automotive end market is also changing as automakers shift the weight of investment toward electric vehicles (EVs) and away from internal combustion engines (ICE). According to Willett, Cognex is also relevant in the EV battery market, but even in that market, there's "tentativeness" among customers right now.

Apple's numbers highlight the case for Cognex

While last year was difficult for Cognex, the company is still set for excellent long-term growth. That argument is based on the recognition that the need to use machine vision to increase precision, quality control, and efficiency in automated manufacturing processes will only increase. For example, it is layering multiple screens on iPhones, reducing misloads, improving inventory management in logistics, and improving precision and quality control in EV battery manufacture.

A customer holding up a mobile phone.

Image source: Getty Images.

While these powerful secular trends in technology should lead to increased adoption of machine vision, its customers must also constantly develop new products. And new product development means more capital spending on production lines, which should filter down into more sales for Cognex.

Apple's sales evolution is an excellent example of this. As the table demonstrates, iPhone and Mac sales growth was driven by new model releases. In contrast, iPad and "Wearables, Home, and Accessories" sales declined due to coming up against tough comparisons with the release of new models in the same period last year.

The inference is clear. Not developing new products is not an option for Apple and consumer electronics companies; the same can be said for automakers. As such, you can expect it, alongside most other consumer electronics companies, to keep investing in creating new products -- and that's music to Cognex shareholders' ears.

Apple Product Category Sales

First Quarter 2023

First Quarter 2024

Change

Commentary

iPhone

$65,775 million

$69,702 million

6%

The iPhone 15 has been well-received by customers

Mac

$7,735 million

$7,780 million

0.6%

New "M3-powered MacBook Pro models" drove sales growth

iPad

$9,396 million

$7,023 million

(25.3)%

Sales declined due to "a difficult compare with the launch of the M2 iPad Pro and the tenth-generation iPad during the December quarter last year."

Wearables, Home, and Accessories

$13,482 million

$11,953 million

(11.3)%

"a difficult compare with the launch timing of several products in this category"

Data source: Apple presentations, CEO Tim Cook's commentary on the earnings call.

What it means to Cognex

Carrying this argument further, it's only a matter of time before Apple and other consumer electronics companies ramp spending again, as they always need to develop new models and production lines.

AAPL Capital Expenditures (TTM) Chart

AAPL Capital Expenditures (TTM) data by YCharts

Meanwhile, there's no let-up in e-commerce sales growth. Amazon and others have tempered their capital spending after the lockdown-inspired e-commerce boom, encouraging them to pull spending forward in 2020-2022. However, capital spending will eventually catch up with the ongoing growth in e-commerce sales.

Finally, no one disputes EV and EV battery manufacturers' long-term growth prospects, even if there's a temporary slowdown taking place at present.

A growth stock to buy

Apple is a fine and worthy stock, but its days of explosive growth are over. On the other hand, Cognex is still in the early innings of its growth. That's why Wall Street analysts have Cognex's earnings exploding by more than 50% in 2025, as a gradual year of recovery in 2024 will lead to a return to more normalized levels of growth for Cognex.

As such, the stock is highly attractive for long-term investors who can stomach the potential for some near-term bad news this year as its end markets still face near-term challenges.