Companies that benefited from the pandemic are in the financial news lately for all the wrong reasons. As businesses and consumers return to normal daily activities, some of the brands that became synonymous with stay-at-home orders and remote work have seen their stocks collapse.

But not all businesses that experienced a windfall are going to revert back to pre-pandemic sales and growth. The effects of some consumer choices last a decade or longer. That's why investors should look at weakness in Idexx Laboratories (IDXX -2.40%) and Pool Corporation (POOL -0.15%) as a golden opportunity -- especially if they keep falling.

A dog and young toddler sitting poolside.

Image source: Getty Images.

Scratching an itch

Across America, nearly one in five households has adopted a pet during the pandemic. The rate was so high that many animal shelters ran out of occupants. Now these pet owners face the ongoing costs of feeding and caring for their furry companions. That includes a lot of visits to the vet.

That's good news for shareholders of Idexx Labs. The company makes a range of veterinary tests and offers a software application to bring them all together. Revenue growth jumped last year as more pets translated to many more vet visits and tests. 

Chart showing large rise in Idexx's revenue since 2020.

IDXX Revenue (Annual YoY Growth) data by YCharts

On top of sales, earnings per share (EPS) was up 28% to $8.60. The company expects growth to moderate this year, shifting back to 10% to 12% for sales and 8% to 11% for EPS. 

That growth should persist for at least the next 10 to 15 years -- the typical life expectancy for a dog or cat. Despite having fallen 25% from the high, shares still aren't cheap at 61 times earnings. Idexx has had a great run, up more than 1,000% over the past decade and doubling since the beginning of 2020. But the combination of steady profitable growth is worth a significant premium. It has shares high on my watch list in case the market provides the rare opportunity to buy shares cheaply.

Making a splash

At least one company had two factors combining to create immense demand during the pandemic. The first factor was the desire to gather with family and friends while staying safe. That meant getting outdoors. The second was rapidly rising home prices in the U.S. 

The combination led many homeowners to conclude that it was a great time to put in a pool. Add in the fact that many people weren't able to take a typical vacation, and the decision was easy for many. According to the Pool & Hot Tub Alliance, sales of residential inground swimming pools rose 24% in 2020. 

Pool Corporation was a big beneficiary. The company handles pool construction and renovations, as well as maintenance such as chemicals, supplies, and parts. As you would expect, revenue has jumped during the pandemic. 

Chart showing large rise in Pool Corp's revenue since 2020.

POOL Revenue (Annual YoY Growth) data by YCharts

All those new pools are great. But it's the services that should keep delivering for shareholders in the years ahead. What the spike in sales doesn't show is that historically, less than one-fifth of customer spend is on actually building the pool. Almost three-fifths is considered non-discretionary maintenance and repair. The rest is in a "somewhat" discretionary gray area.

Like Idexx Labs, the stock isn't cheap despite falling 22% from its high late last year. It sports a price-to-earnings (PE) ratio of 31.

It has been a huge winner for long-term shareholders. $10,000 invested in January 2010 would be worth almost $400,000 today. The total shareholder return over the past 25 years is triple that of the S&P 500 index.

Management still considers the industry highly fragmented. That means it can continue making acquisitions to bolster growth on top of the predictable recurring revenue from existing pool owners. Together, those factors should sustain the average of 9% compounded annual growth for sales and 23% for EPS over the past decade. If it does, Pool Corporation should handily beat the market.

Services are valued more than products

Sales of pandemic favorites like Peloton's exercise bikes and Take-Two Interactive's video games have seen dramatic slowdowns as the world returns to normal. But their products don't require an ongoing financial commitment. If customers decide to, they can simply stop using -- and paying -- for the service. 

Pets and pools are subject to a different economic equation. For their owners, the costs persist long after the initial purchase. And they don't have much of a choice. That's why both these companies could be great additions to a portfolio if the market continues selling off.