Let's face it, few things in the investing world last forever. Whether it be creative disruption, changing tastes, or managerial blunders, there is almost always something just around the bend that could make a sure-fire business a note in the history books. 

To find that rare gem of a forever stock means looking for some unique traits that will help it stand the test of time: an essential human need, a challenging or unappealing market to disrupt, a business with a track record of adapting, and one that can generate reasonable rates of return in any economic environment. 

That narrows down the field quite a bit, but one that does fit the bill is water heater manufacturer A.O. Smith (AOS -0.71%). Here's what makes this industrial stock one to buy and hold forever. 

Checking all the boxes

Heat and hot water certainly qualify as essential human needs. A.O. Smith pioneered the water heater by first patenting a method for fusing glass to steel to create the first glass-lined tanks in the 1930s.

There are few instances where someone's water heater needs replacing and they say, "I think I'll wait a few months." This is the largest driver of A.O. Smith's business. In the U.S. and Canada, 80% to 85% of residential water heater sales are replacements.

That high percentage of sales on the replacement side means the business isn't that sensitive to the ups and downs of the residential construction market. In 2021, A.O. Smith and competitor Rheem each had about 35% of the North American residential market, and A.O. Smith's share of the commercial market is closer to 50%. There could be new technological developments to improve efficiency and a changing competitive landscape, but it's extremely hard to imagine water heaters becoming unnecessary.

Since management decided to focus exclusively on water heaters, boilers, and other water technologies -- it had many divisions before, including auto manufacturing and electric motors -- the company has become a surprisingly high-return business. Since the 2011 split, its return on capital invested has more than doubled to 24.1% and it generates about 11% of its total assets in annual free cash flow. All that excess cash has been used to grow its dividend by 650% and reduce its total shares outstanding by 16% over that 11-year period.

These factors have translated into a wealth-compounding stock that has more than quintupled the S&P 500 on a total-return basis over the past 30 years.

The warts

Even companies that meet the criteria for a forever stock aren't without flaws. So anyone looking at A.O. Smith should be cognizant of these business risks.

Any exposure to the residential construction market will lead to cyclical earnings. It may only be a small portion of the overall business, but it does have a tangible effect. Management admitted as much before its third-quarter earnings release as it lowered its guidance for 2022 largely because of weakening residential demand.

Another risk that is worth considering is the company's exposure to the Chinese market. Management made a strong push into China starting in the 1990s, and it has been a significant revenue growth lever for several years. Recently, though, that division has taken a hit as COVID-related lockdowns have significantly affected economic activity overall.

Investors should also factor in the possibility of U.S.-China relations deteriorating and the potential impact on A.O. Smith's standing in that market. I am by no means saying this will happen. But it is a low-probability event that could drastically affect the business and should at least be considered in a worst-case scenario. 

Even if that were to happen, though, its North America operations remain the main driver of profitability for the business and would likely make up for any losses overseas.

Hold forever, but buy now?

Whether a company is worthy of holding forever and whether it is worth buying today are two entirely separate questions. Even a high-return business can be a bad investment if bought at an egregious valuation.

Today, shares of A.O. Smith trade at 19 times earnings and 24 times free cash flow. That valuation puts it squarely in the "not too expensive, but not necessarily cheap" range. Over the very long haul, investing in A.O. Smith today will likely pan out as a good investment, but current weakness in the residential market and China's slowdown could present even more lucrative valuations if you have the patience to wait.