On a risk/reward basis, I think machine vision company Cognex (CGNX 2.06%) is a better buy than industrial conglomerate 3M (MMM 0.46%) right now. They are very different companies with heavy exposure to end markets like consumer electronics and automotive. However, Cognex has significantly more upside potential than 3M, while the downside potential is similar. For that reason alone, I think Cognex is the better buy. Here's why.

A disappointing year for 3M and Cognex

There's no getting away from the elephant in the room. Both companies have had a tough year. 3M is set to deliver an organic sales growth decline of 3% for the full year (a figure at the low end of its initial guidance range of flat sales on 2022 to a 3% decline), and Wall Street analysts believe Cognex's full-year sales will decline by 17.5% compared to 2022.

Seeing both stocks down significantly this year is not surprising.

MMM Chart

MMM data by YCharts

The reason for the disappointing sales is relatively simple. Although 3M sells mainly to other industrial and healthcare companies, it has substantive consumer sales. In addition, a lot of its industrial sales go to customers in interest-rate-sensitive end markets like consumer electronics and automotive. Unfortunately, the rising rate environment has continued to pressure consumer discretionary spending, and that's taken its toll on the spending plans of consumers and consumer electronics companies.

In common with 3M, Cognex's machine vision counts consumer electronics and automotive as two major end markets. The company's third-largest single market is logistics, where its machine vision solutions are used in e-commerce warehousing. It's a market that's suffered a significant decline in spending (see Amazon.com's cutbacks in spending on warehousing), due to the consumer spending slowdown and a natural correction from the high spending on e-commerce facilities during the pandemic's height.

In short, both companies have suffered the chill wind of slowing end markets in 2023.

Person holding a smartphone.

Image source: Getty Images.

The economy will turn

That said, interest rates won't rise forever, and history suggests the cycle will turn, leading to a release of spending. For example, there's no way consumer electronics companies like Apple (a Cognex customer) can delay developing new products in the marketplace for too long. Automotive companies continue to ramp up spending on electric vehicles (EVs) aggressively, taking an ever larger share of overall automotive spending.

3M sees its EV-related sales growing 30% in 2023 to $600 million , and on the last earnings call, Cognex CEO Rob Willett said he believes EV battery companies (a market for Cognex) will ramp production capacity by five to seven times "between now and the end of the decade."

Both end markets (consumer electronics and automotive) will benefit from a lower interest rate environment, as will Cognex's logistics end market and 3M's consumer segment sales, notably those relating to the housing market.

Why Cognex is better placed

While both companies are a play on a cyclical recovery in the economy, Cognex has more upside potential. 3M is a $30 billion-plus revenue company with growth prospects of, at best, gross domestic product (GDP) plus a bit. Meanwhile, as the chart below shows, Cognex has a history of highly volatile sales growth. All it will take is a few large orders from, say, Apple in consumer electronics or maybe Amazon in logistics, and Cognex's near-term growth prospects will look a lot brighter.

MMM Revenue (TTM) Chart

MMM Revenue (TTM) data by YCharts

In addition, while 3M's current dividend yield of 6.3% is desirable, it may not prove sustainable due to multi-billion-dollar cash calls necessary to meet legal settlements and declining cash flow generation. In addition, 3M is spinning off its healthcare business in 2024 and will therefore lose its most stable income and cash flow stream. 3M must also demonstrate an ability to grow its profit margin again.

Cognex stock over 3M

Cognex's potential upside is explosive. While both companies face downside risk (the interest rate cycle may not turn for some time), 3M has the added risk that it might not be able to sustain its dividend and convince the market that it's turned around its profit margin declines. All told, Cognex is the better buy.