Procter & Gamble (PG 0.54%) isn't the first stock you'd think of when naming risky investments. The consumer staples giant has been consistently profitable for decades, and its massive global selling footprint makes it among the most stable businesses around.

Yet, its shares have still declined in 2022 on fears of a recession potentially hurting demand for its premium products in niches like laundry, skin care, and grooming. Those worries aren't unfounded. But investors should still consider P&G an attractive investment idea heading into 2023. Here are a few reasons why.

1. Market share

P&G's growth is looking weaker today than it has in years. Yes, organic sales were up a healthy 7% in the first-quarter selling period that ran through late September. However, all of that growth came from raising prices. Sales volumes decreased as consumers became more sensitive to price increases.

This development has investors worried that P&G will have to sacrifice either profitability or growth as economies around the world slow down.

Zoom out, though, and you'll see more reasons for optimism. P&G is still leading the industry on key trends like market share, for example. Rival Kimberly-Clark reported slower sales growth and bigger volume declines in its most recent quarter. That performance suggests the company can continue winning share even through a temporary industry slump.

2. Profit margins

P&G stock also looks a lot less risky when you consider its market-thumping profitability. The latest round of price increases on brands like Tide and Bounty, combined with cost cuts, helped the company maintain its operating profit margin despite soaring costs. Earnings are on pace to rise by about 2% this year, executives said in late October, even after accounting for a 6 percentage point drag from the strengthening U.S. currency.

That unusually high profit margin helps insulate P&G against a downturn. It also implies higher consumer affinity for its products. Finally, those earnings will allow the company to continue investing in areas like R&D so that it can lead the industry once the next cyclical upturn starts.

3. Cash flow

If cash flow is destiny, then P&G has a bright future ahead. The company is on pace to convert roughly 90% of its ample earnings this year into free cash flow. That success is helping fund huge returns to investors, too.

P&G will pay roughly $16 billion to shareholders this year through stock buybacks and dividend payments. That dividend has grown for nearly 70 consecutive years, making it one of the longest such streaks on the market.

In that context, P&G doesn't seem nearly as risky as the stock's 10% decline through most of 2022 would suggest. Its market share position is dominant and getting stronger, and its finances are stellar. Worries about a recession on the way have Wall Street focused more on the next quarter or two. Take advantage of that obsession with the short term to position yourself in a stock that promises a nice balance between growth and income.