To add to dantheman’s point, a lot of merchants are more than willing to spend 3~5% in fees if it means making a register line 10~15% faster, or reduces the cash stock they need to keep at hand and manage thorough the day.
Privileging cash as a customer isn’t universally better for the merchant.
It’s an interesting approach, as you wouldn’t enter a restaurant and ask what dish would make them the most margin. Or go to the post office to ask what packaging is cheaper for them to ship. In that respect I think asking what payment means costs more to the shop would break a social norm, so I’m surprised you file it under politness.
Otherwise shop owners have many many ways to signal how much they want you to do something or not. Wether the card reader is hidden under the counter or the most prominent thing when you need to pay could be a very clear signal for instance.
I'd argue it isn't the same. Asking for cheapest package/most margin dish affects you most of the time, while paying cash is the same as credit card most of the time.
Although I've never seen a merchant not prefer cash, except maybe big corporations.
Privileging cash as a customer isn’t universally better for the merchant.