It's pretty simple. In a highly competitive market, margins will approach 0.
This is self evident, due to how competition works. The only way higher margins are achieved is by being a first mover (fine), or by using stickiness to make it difficult for customers to switch (AWS egress fees).
Thought experiment. Say Apple had to prompt you to choose from top 3 app stores when starting up your new iPhone, and was not allowed to default, or even suggest as default, their own app store. A dev clones the app store 100% in appearance and behavior, but charges a 5% fee to app creators. In this world most likely Apple would lose a huge portion of their app store margins, as customers could make microtransactions at greater discount.
Yes, Apple would likely still carry some premium due to being first party, but not 30% cut.
What we'll likely see, probably many years from now, is a requirement to have open APIs to allow for easy transfer between SaaS services. Yes, this would reduce SaaS margins significantly. It gives the customer a huge amount of leverage to negotiate in their favor.
Customers having leverage is what leads to a competitive and fair market.
Right now SaaS are allowed to operate as a de facto Monopoly through network effect (cost of switching is very high). A walled garden is not a monopoly in the traditional sense, of course, but is a de facto one over the set of people within your walls.
Yes, many years in the future, software is likely to be delivered close to "at cost" which would be a huge win for the customer, and really society at large. Right now that money is going towards paying devs 10x the median salary, which obviously creates a bimodal society, to a certain extent.
Believe me, I'm as capitalist as they come... But capitalism only thrives in a competitive market.