Chewy (CHWY 2.99%) stock had a forgettable 2022. The pet supply specialist's stock price fell by over 30% through mid-December, roughly doubling the decline of the S&P 500 index.

That underperformance came as investors reacted to the fact that Chewy is experiencing a growth hangover compared to earlier phases of the pandemic when pet adoption rates soared and shoppers focused on e-commerce spending.

That hangover won't last forever, though, as company management made clear with a recent earnings update. Chewy is steadily winning market share and boosting profitability. Let's look at how those trends might put long-term investors in a great position if they simply hold this stock for five years or more.

Bigger sales and better margins reported

Pet supply product sales are insulated somewhat from a recession, as consumers tend to be hesitant to tinker with their pet's favorite brands when reducing their household budgets. And Chewy's business is mostly dominated by staple products like pet food, which accounted for 83% of sales this past quarter.

You can see evidence of that setup helping the business in the retailer's mid-December update. Sales were up 15% year over year through late October, and gross profit margin rose as the company easily passed along higher costs through price increases.

"Our results are a clear indication of the resilience of the pet category," CEO Sumit Singh said in a press release, "and how Chewy's compelling value proposition ... continued to resonate with our customers."

It's not hard to see how these competitive assets will allow Chewy to win market share over the next five years even if a recession develops in 2023.

Chewy has more diversity in its revenue streams

Chewy's sales footprint will likely extend well beyond product sales in a few years. It is already pushing deeper into the healthcare and insurance niches today, and management is excited about the huge addressable markets these industries offer.

Executives highlighted the recent launch of the Vibeful corporate brand, which carries multivitamins and supplements for pets. "We believe this launch gives us another opportunity to strengthen our connection with customers," they said in a shareholder letter. Watch for more moves like this to make Chewy into a more diverse business over the next five years.

Stock price returns

Chewy's short-term stock price returns will depend on a few unpredictable factors, especially the pace of economic growth in key markets like the U.S. No retailer would be immune from a sharp slowdown in consumer spending, not even a retailer that specializes in staple products like pet food and supplies.

CHWY PS Ratio Chart

CHWY PS Ratio data by YCharts

Still, it seems highly likely that Chewy stock will deliver solid returns for investors who simply hold it over the next several years. The company recently demonstrated that it can win market share during boom times and that it can expand sales and profitability even during a slowdown in the wider economy.

That financial strength will be valuable over the next few years, even if 2023 starts off with slower growth. In any case, put this e-commerce specialist in your portfolio and you're likely to be glad you did when you're looking back a few years from today.