I imagine handling cash probably has hidden costs that are comparable to the swipe fees, though.
I think in the US merchant fees for card transactions are much higher though so may be a different ball game over there.
Mind you - haven't used that for years and I think most supermarkets have stopped offering it.
(The factor of three is real, but perhaps that business had unusually bad contracts with the credit card companies. I wouldn't know.)