I beat up on Safeway (NYSE: SWY) a lot. It's my go-to comparison against Whole Foods (WFM) when I want to show how much organic and specialty-food sales are growing compared to their conventional counterparts, which, well, aren't. But after a recent article, I started wondering if it was fair to treat Safeway that way. Read on to see why, after a closer look, I've decided that, yes, it is fair, and I am going so far as to make an underperform CAPScall to back that up.

The best of the worst?
Safeway is not the worst of the so-called big three grocery retailers, which also includes SUPERVALU (SVU) and Kroger. That distinction goes to SUPERVALU, whose hemorrhaging profits and SVU ticker always make me think of Law and Order: Special Victims Unit. Really, Safeway is the best of the three, with the highest margins, the most free cash flow growth, and the lowest valuation. Unfortunately, that just makes it the best of the worst.

EBITDA Margin TTM data by YCharts.

Let's look at the three by comparing EBITDA margin, to account for Safeway's $2 billion writedown in 2009 and SUPERVALU's almost annual writedowns. All three have been on the decline for a while now, and while Safeway leads the pack, it's easily beaten by competitor Whole Foods. It may be tempting to explain this away with Whole Foods' emphasis on premium products, which command a higher margin, but even Wal-Mart (WMT 1.32%) is almost as profitable, and Dollar Tree (DLTR -0.14%) blows them all out of the water.

One of the problems Safeway faces in this regard is that it doesn't know whether it wants to be a low-cost or premium retailer. Its store brand O Organics line of products are priced similarly to conventional name brands, preventing it from capturing much of the premium that organic products command. On the other hand, it's hard for Safeway to safely compete with the likes of Wal-Mart and Dollar Tree, which have both been aggressively stealing market share at the low end.

Declining margins wouldn't be the worst thing in the world if Safeway could outpace the declines with sales growth, but that isn't happening. Safeway has the impressive distinction of having experienced consistently flat sales for five years now, while competitors either grow or fall. This would indicate that Safeway's declining margins have simply been the cost of retaining customers as the industry becomes increasingly bifurcated between the high end and the low end.

Not a safe way to invest
Because Safeway's sales and margins have both suffered, its relatively decent free cash flow growth over the last five years is best explained by a decline in capital expenditures -- which is to say, Safeway is reinvesting less and less in its business. That's a strategy that can only work for so long, and really, it's not working well for Safeway already. The five-year growth is still benefiting from a surge from 2007-2009, but since then, free cash flow has fallen by nearly half.

Safeway's rapidly declining free cash flow is especially problematic for investors attracted to its 4% dividend. A year ago, the company put its investment-grade credit rating on the line, earning downgrades from Fitch and Moody's by issuing over a billion dollars in debt in order to buy back stock in the belief that interest rates were low, its stock was undervalued, and it could grow operating cash flow to repay the debt. Both the stock and operating cash flow have fallen about 15% since the buyback program was announced.

The Foolish bottom line
The fact is, Safeway and the rest of the big three are caught between customers who want to save money and customers who want to upgrade their menu. Their margins have been increasingly compressed as they fight a seemingly losing battle to retain market share against stores that specialize in either customer group. Safeway's new strategy of reinvesting in its stock instead of its business seems particularly ill-founded, and won't be good for shareholders in the long run.