It appears increasingly likely that the U.S. economy is heading for a recession. Analysts expect a 6 percent year-over-year decline in the S&P 500's earnings for the first quarter of 2023.

During these challenging times, investors can flock to defensive, recession-proof companies like Procter & Gamble (PG -0.03%). The stock is up 20% over the past six months.

But there's an argument that such a popular, safe stock like Procter & Gamble could hurt your portfolio. Here is why investors should think twice before buying shares.

It has nothing to do with Procter & Gamble's business

Am I nuts? It's a fair question -- Procter & Gamble is a blue chip stock, a legendary dividend payer that has thrived for many decades as a beacon of stability on Wall Street. Consumers buy its countless products under dozens of well-known brands like Tide, Pampers, and Crest, adding up to more than $80 billion in annual sales.

It's considered a boring business but has proven an excellent investment if you give it time. Shares have outproduced the S&P 500 roughly 2:1 since the early 1990s had you reinvested dividends. No, I do not deny Procter & Gamble's greatness or track record. Instead, I'm arguing that there's a time and place for everything, and now is not Procter & Gamble's moment.

The stock looks appealing on the surface

The appeal of a company like Procter & Gamble is consistency. You rarely see eye-popping growth from a company that sells toiletries, but it will deliver during good and bad times. Analysts expect low to mid single-digit earnings-per-share (EPS) growth from the company moving forward.

The S&P 500's outlook isn't so good in the short term. In January, analysts called for the index to grow earnings by roughly 4 percent in 2023. But more recent sentiment seems increasingly negative; Q1 earnings could decline by 6 percent from the prior year.

PG PE Ratio (Forward) Chart

PG PE Ratio (Forward) data by YCharts

Using that context, one could see why Procter & Gamble stock is in high demand -- investors get market-beating growth (at least right now) and a reliable 2.4% dividend yield. You're paying for a bird in the hand versus the two in the bush.

But the market should pass it over time

But this could backfire when the economy stabilizes and the next bull market begins. Investors may no longer pay such a premium for slow and steady stocks like Procter & Gamble. There's a large gap between Procter & Gambles's valuation, a forward price-to-earnings (P/E) ratio of nearly 26, and the S&P 500's 18.

Suppose the market reprices Procter & Gamble closer to the S&P 500. The company's EPS would take until 2028, growing by 7% annually (higher than analysts' estimates), to trade at 18 times earnings at today's share price. That doesn't even factor in likely earnings growth by the S&P 500 over that time.

In other words, I'm saying that Procter & Gamble's safety as an investment has bid the stock to a valuation that its growth likely won't justify for several years. It's possible that Procter & Gamble will hold up better than most stocks in a potential market crash, but could woefully lag behind the S&P 500 when the next bull market begins.