Wall Street's worries about a potential recession on the way have put more focus on dividend stocks in 2023. These companies tend to run more stable businesses that aren't as exposed to short-term demand swings. Their dividend payments can also be a valuable buffer, providing some returns while stock markets are headed lower.

With those positive factors in mind, let's compare two highly successful retailers, Target (TGT -1.02%) and Home Depot (HD -1.13%), which have several decades of steady payout increases between them, to see which is the better stock purchase right now.

Pivoting with demand shifts

Both companies are struggling with a pivot in demand away from categories that had been booming in earlier phases of the pandemic.

Target executives cited "softness in discretionary categories" for keeping a lid on sales growth into early 2023. Comparable-store sales were up less than 1% in the most recent quarter. And Home Depot recently announced a 0.3% comp decline in the fourth quarter. Both companies are projecting roughly flat sales trends in 2023 following huge gains since 2019 .

Target has a slight edge in this department given its retailing portfolio that includes both discretionary and consumer staples products. You can see evidence of that diversity helping the business already. Customer traffic rose 1% this past quarter even after soaring by over 8% in the year-ago period. Home Depot saw a 6% Q4 traffic drop, in contrast, and had to rely on rising prices to keep sales roughly flat.

Cash flow and margins

Income investors gravitate toward highly profitable businesses as these companies often have lots of excess cash to return to shareholders. That's more the case with Home Depot today than with Target.

TGT Operating Margin (TTM) Chart

TGT Operating Margin (TTM) data by YCharts

Home Depot's profit margin in 2022 was near 15% of sales, keeping it in the industry's leadership position. The comparable figure for rival Lowe's was 10% of sales. Target's margin, in contrast, fell hard in the past year and now sits around 3.5% -- less than that of peers like Walmart.

The good news is that Target has largely finished the hard work of getting its inventory levels back in line with current demand. After relying on markdowns for much of 2022, management says the company is in a much healthier position today, meaning profit margins should start climbing back up from 4% right now toward the 6% that shareholders saw before the pandemic volatility struck.

Dividend track record

Target beats Home Depot in its dividend history. Yes, Home Depot pays a larger share of its earnings out as a dividend, making it unusually generous on this score. But Target has a longer track record of uninterrupted increases that's partly a result of its balanced retailing portfolio.

Home Depot had to suspend its increases during The Great Recession, and another pause isn't out of the question if the housing market takes a big hit. Target stock also delivers a higher yield today -- about 2.5% compared to Home Depot's 2%.

But Home Depot still looks like the stronger overall dividend stock thanks to its profitability and management's excellent capital efficiency. Home Depot's return on invested capital sits over 40%, while Target's has recently declined toward single digits.

While the retailer has a shot to turn around its finances in the next several years, most investors will prefer a business that's already performing well over a potential rebound story.