If you use square or stripe the fees are super low - just build it into your prices and stop crying. I’m sure small businesses would prefer not to pay the electric each month as well but it costs money to have a business. Haha.
Square costs 2.6% of each transaction, plus 10 cents off the top as well. There's also no discount for debit cards, even though they're cheaper to run than credit cards. If you're running a low-margin business, especially one with a lot of small transactions, that adds up quickly. There's also the risk of chargebacks and dealing with those, which are not something that has to be worried about with cash transactions. There's certainly costs and risks with other payment methods, but accepting credit cards has one of the most direct costs off the top of every transaction, and unless you go completely cashless most of those expenses still exist anyways (theft is still a risk whether you have $100 or $10,000/day in cash transactions, and you still have to go in and deposit that cash frequently regardless.)
There's still places around here that are cash or check only - the check part still surprises me, as I'd expect that to have a high level of risk (bounced, invalid, or stopped checks.) They usually have an ATM on site, so if you don't have cash or check you can pay $2.50 and get cash out.