I'm not sure how higher prices and people keeping their phones longer are related though. Are you suggesting those people who keep their iPhones for 4 or 5 years and happy to pay £1200-£1700 for an iPhone when they do upgrade, because they keep the phone longer anyway? There is still the initial outlay for the device and this isn't spread out over several years, its usually paid off over 2 or 3 years maximum. I don't think we can justify higher prices with longer upgrade intervals to be honest.
First off, thank you for bearing with me as I articulate my thoughts. Sometimes, ideas that sound good in my head suddenly don't make as much sense after I type them out, and this gives me an opportunity to go back and revise them.
All I know is that this is very reminiscent of 2013, when the overwhelming dominant narrative was that Apple was doomed and that it would be disrupted by Android at at time when Android was pumping out an endless torrent of cheap handsets. The problem I have had with this line of reasoning, which you will find me reiterating from time to time, is that conventional disruption theory does not apply to the mass consumer market where the buyer is also the end user. And we know how the last decade has played out. How many android OEMs went out of business while Apple would go on to become even larger and more successful.
The key to understanding this is first acknowledging that the consumer is not rational by nature. I don't mean this in a bad thing, like they are wont to make poor purchasing decisions on a whim. What I am trying to say is that because I am buying for myself (as opposed to a business manager negotiating a contract for his entire department), I am free to value certain features which matter more to me, even if they cannot be quantified on a spec sheet.
This forms the basis of the saying "Not everything which matters can be measured. Just as not everything which can be measured, matters." I feel the moment you try to compare the iPhone to an android phone by claiming how the latter is cheaper, or comes with more ram, or has a charger included, then I feel the plot has been lost, because you are focusing only on tangible benefits, without realising how Apple is able to set itself apart from the competition in other intangible ways (such as the ability to spark joy with their products through the careful integration of hardware and software) that matter to their user base, even if you can't assign a numerical value to say, satellite SOS or crash detection, or "coolness".
What I am fairly certain is that Apple is likely aware that iPhone sales will dip slightly (and will likely continue to dip in the near future as upgrade cycles lengthen) and are banking on higher margins to maximise profits. Again, it's not a bad thing to have flat sales when global smartphone sales are dropping.
On the consumer side, It appears that Apple is banking on trade-ins and instalment plans to make the otherwise higher price of an iPhone more palatable to consumers. I know trade-ins were key to growing Apple's install base a couple of years ago (collect used iPhones to refurbish and resell in the grey market); I am not sure how relevant that still is today.
As to how it can be justified, my thinking is that while it may cost more upfront, I would think that I am ultimately getting a better deal because I know it will last longer (better build quality and repairability) and am assured 5-6 years of software updates on average. I bought my 13 pro max with the expectation that I would hold on to it for at least 4 years (am planning to get the battery replaced later this year, once it dips below 80% health). So it's a pretty good deal overall, I feel.
I guess what I am trying to say is that there really doesn't seem to be any one factor as to why people continue to buy iPhones in spite of cheaper alternatives, in spite of folding phones etc. Just that they are. These just represent my best guesses to date.