Funny thing is Apple's competitors
don't make money. Apple has ~50% of all smartphone revenue and 87% of the world's total smartphone profit share - iPhone X alone was 35% of global profit share with, to your point, only 22% of the market. Less, even, my data shows 19% of shipments most recently. Samsung is next in line off the back of approximately equal shipment volumes. Everyone else effectively breaks even or loses money. [1]
I'd say Apple's got this one figured out.
[1] https://www.forbes.com/sites/chuckjones/2018/03/02/apple-con...