Costco (COST -0.65%) stock is popular on Wall Street for good reason. The warehouse retailer dominates a huge segment of the retailing industry, and its membership fee income provides earnings stability through a wide range of selling conditions. Costco's performance through every phase of the pandemic illustrated consumers' loyalty to the business, whether they're looking to save money during a downturn or splurge when incomes are rising.

But Costco's growth trends are slowing, and the stock is valued at a huge premium compared to other, more profitable retailers. So let's take a closer look at whether investors should be happily bulking up on Costco shares right now.

The main challenges

After seeming impervious to slowing consumer spending in recent quarters, Costco recently revealed that it is not immune to the trends that have hurt peers like Walmart and Target in early 2023. Comparable-store sales growth fell to below 1% in the U.S. market in March and slumped by 12% in the e-commerce channel. Overall comps were up just 3% compared to 7% in the previous quarter.

Most of the demand shortfall is coming from consumer discretionary niches like jewelry and consumer electronics, management said in a recent conference call with investors. But that's not as much of a challenge for Costco as it is for the chain's peers. Costco's low pricing strategy insulates it from this demand shift away from discretionary purchases that had previously boosted profit margins for Target and Walmart.

The profit outlook

While Costco is less profitable than its rivals, shareholders are far less exposed to the cyclical swings that impact the retailing industry. Operating profit margins jumped and are now falling at both Walmart and Target, even as the warehouse giant continues to churn out the same 3% profitability.

WMT Operating Margin (TTM) Chart

WMT Operating Margin (TTM) data by YCharts

This stability is valuable, but it also means investors aren't likely to see Costco increase its margins. Management has stated, for example, that additional income from membership fee increases will be used to extend the chain's price leadership position. "We take [the higher fees], and directly become ... even more competitive," CFO Richard Galanti said in early March.

Buy, sell, or hold?

The main question is whether Costco's premium stock price is worth the assets you get by owning a retailing business with unusually strong sales growth and highly stable -- if relatively low -- annual earnings. Shares are trading at 0.9 times annual sales compared to a P/S ratio of 0.7 for both Walmart and Target. And you can purchase Kroger shares for just 0.2 times revenue.

Costco's strong selling model, plus its industry-leading customer loyalty, makes it clear that the stock deserves a premium over these peers. So there's no reason to abandon the stock due to slowing sales trends in the retailing world.

At the same time, shareholders' returns will naturally be limited by the stock's higher price relative to peers. However, as long as you can temper your expectations and patiently watch Costco win market share over time, you will likely see strong results from this high-performing business in your portfolio.