According to this free market logic, I presume that the ideal capitalist model involves mass slavery? Because that’s the best way to keep costs as low as possible. There’s a moral element at play that you’re not acknowledging. If a society were to agree to change the entirety of the market conditions such as ‘we don’t have slavery’ - then competition operates within a new framework. If we change the framework to include something like ‘minimum wage’ then provided all companies within the market operate within that framework, then profits become universally minimised and shared with workers.
Alternatively people can make an informed choice about the ethical choices of who they buy from - if you can redistribute capital to create a burgeoning middle class, then ethical choices become affordable and taken up.