The major cost of cash for retailers is in shrinkage - cash disappears, is counterfeit, or isn't collected in its full amount.
All that other stuff - retail workers, Brinks trucks, counting the drawer, safes - that doesn't go away just because you accept credit.
Also, card fraud is a cost for merchants - they're on the hook, but bad debt is absolutely not the merchant's problem - in fact that's a plus for accepting electronic payments... the merchant doesn't have to extend credit to customers and then try to collect later - collection is the issuing bank's problem.
Merchants who do "big ticket" sales (more than the walking around money in the average wallet) LOVE credit, because it makes purchases less of a hassle for the buyer. Small ticket retailers don't like it that much because a) they can't eliminate cash, b) accepting credit doesn't distinguish them in the market and c) because they aren't capitalizing on the opportunity for big ticket sales.
And then there's loyalty programs and direct marketing... retailers who have figred that out LOVE electronic payments for the insight they can deliver on customer behavior.
Yes, there are businesses who hate dealing with merchant banks and electronic payments, but they are the ones who are only doing it because of the loss of business they would suffer if they turned away cashless Millenials - Those businesses' opinion of credit is going to be very gloomy indeed - like their own futures in the marketplace, perhaps.