You bring up a salient point that is often overlooked. Many people presume “capitalism” is bad because it is all about profit and profit can only be achieved by cutting costs (wages) or quality to the bone in order to undercut everyone else and sell the cheapest item possible. They overlook the fact that not everyone competes on price, they can also compete on quality and service. I think there is a saying that is something like this. “You can have it cheap, you can have it of high quality, you can have it quickly – pick any two”.
These are the 3 basic areas of competition, price, quality, service (speed of service here). So since any given company can only delivery on two of those at the most, then a competitor can avoid direct competition by competing in two other arenas. So if say Walmart provides the cheap goods of high quality with crappy service, then you can provide expensive goods of high quality with high service, or cheap goods of low quality with high service… some consumers will be desirous of the different combinations. Now you might not put Walmart out of business, but given there are enough people that will pay more for better service Walmart will simply never capture those customers without changing their business model, and when they do, they’ll lose the customers that liked their former business model. This is a big reason Apple has done so well, maybe their products cost a bit more but the quality/experience is so much better there is a certain set of consumers that are willing to pay more for the experience.