The S&P 500 fell into a bear market in early 2022 and it has been trying to work its way back to breakeven. The inflation and recession fears that pushed that index lower took a huge toll on some prominent industrial names, including Stanley Black & Decker (SWK 1.56%), Rockwell Automation (ROK 1.05%), and A. O. Smith (AOS 1.17%).

All three still have long-term appeal, making their sell-offs a potential opportunity for investors. Let's take a closer look at why these are three industrial stocks worth buying before the market recovers.

1. Stanley Black & Decker: Quick to fall, quick to rise

Stanley Black & Decker's stock price decline has a lot to do with its withering outlook for 2022. When the year began it was projecting annual adjusted earnings between $12 and $12.50 per share. By the end of the second quarter, that range had projection plunged to between $5 and $6 a share. Rising inflation and softening consumer demand are both big parts of the story. 

Stanley Black & Decker is an industrial stock, and industrials largely sell to other companies, so why even mention consumers? The answer is that while the company sells tools and industrial fasteners, consumers are an unusually large part of the company's puzzle. Roughly 30% of its revenue flows from sales made at Home Depot and Lowe's. Consumer spending tends to fall more quickly (and rise more quickly) than business spending. This "short-cycle" spending pattern is terrible for Stanley Black & Decker right now, particularly as it faces inflationary pressures. 

However, for intrepid investors, the historically high 3.2% dividend yield might be worth the risk given the company's more-than-five-decade history of annual dividend hikes (it's a Dividend King), including one scheduled for September. The stock price is off by nearly 50% so far this year. When the economy turns up, though, Stanley Black & Decker is likely to be one of the first to benefit. Given its long history, it will likely muddle through until that point without too much trouble.

2. Rockwell Automation: Helping others by saving them money

Rockwell Automation sells its products exclusively to other companies, but the key here is the reason customers come to the company. As the name implies, it sells automation products and related services, things that help save money. Right now Rockwell Automation is feeling the pinch of inflation and supply chain bottlenecks. Investors have pushed the stock down nearly 30%. To be fair, the company's full-year sales guidance was lowered when it reported fiscal third-quarter 2022 earnings and it narrowed its earnings guidance at both the top and bottom ends.

But here's the interesting thing: Rockwell Automation also highlighted that its backlog is sitting at record levels. Backlog is a measure of orders that have yet to be filled, so it seems like there's still a fairly bright outlook here. And yet, when you think about what Rockwell Automation sells, that kind of makes sense. If there is a recession the company may see results stall some, but the long-term demand from cost-cutting customers probably won't go away anytime soon. The current sell-off, then, could be a long-term buying opportunity.

3. A. O. Smith: More hot water, not less

In modern Western nations, hot water is taken for granted (until it's gone for some reason). In emerging markets, hot water is an affordable luxury. A. O. Smith's major business is selling hot water heaters, though it also makes air and water purification products. In developed markets, hot water heater sales are driven by the replacement market (nobody wants to live without hot water). In emerging markets like China and India, the driving force is new construction (everybody wants hot water as soon as they can get it). 

China has been a growth market for A. O. Smith for many years, but with so much development the construction space is showing a strain. The company's near-term results could be touch and go, given that strong second-quarter revenue, up 12%, was largely driven by price hikes, with management specifically noting sales weakness in China as a headwind. So there is a mixed picture here, at best. But take one cold shower and you'll understand how desirable A. O. Smith's products are. Moreover, the company is still expanding into India, another fast developing market. The stock is down nearly 30% so far this year, which seems overdone given the company's revenue growth and the products it sells. 

A tough time to buy

It isn't easy buying when everyone else seems to be selling, but sometimes that's when you find the best deals. Stanley Black & Decker, Rockwell Automation, and A. O. Smith are each down sharply, even though there are long-term reasons to still like the stocks. If you have the stomach to go against the grain, these industrial stocks are worth a deep dive before the rest of Wall Street realizes the sale that's going on.