As an example, Apple's profit margin on the App Store was about 80% in 2019[1].
[1] https://www.bloomberg.com/news/articles/2021-05-01/apple-s-a...
That was the thing though, a business could decline to accept particular cards or cards at all and still perform transactions. That "opportunity" has generally not extended to the app store world in a practical way. If you want to play, they had their cut and customers and vendors didn't have a whole lot of say in what was reasonable. There is no simple default transaction (like cash) that they were trying to out compete.
Source: Involved in multiple such deals over the years.
Also, MC/Visa charge basically nothing for debit cards, and they do not take on any of the chargeback/default risk of credit cards, so I assume the rest of the fees are for the rewards for the most part. Which is why Discover/Amex fees are similar too.
Just so that we're talking on equal terms here, card processors and networks solve a massive amount of problems that existed with cash. Pre-card, many stores setup credit accounts with individuals, had book keeping practices to deal with, and had to chase down credit lines they themselves offered. Even with debit cards, card networks facilitate the ability to automatically move money between parties and give customers the ability to dispute/chargeback fraudulent transactions easily. If you physically hand a merchant cash, you can't claw that back without a legal process, whereas you're afforded protections by the card network.
But the 30% cut is completely different from card processors. Of the 30% to Google Play or to Apple, a small fraction (2.9%ish) is actually the card overhead. The rest is split between pure profit, infrastructure, and whatever else gets tacked on.
Cards definitely offer important things to facilitate transactions that are objectively better than a pure cash world for most people. But it's important to call out crazy cash grabs like 30%, which is unheard of even in the payment network world.