Therein lies the real risk for Apple, it looks like their revenue chart is going in the right direction, with other parts of the business slowly making the iPhone less dominant. In reality though, service revenue is heavily tied into the iPhone user base, due to the far lower numbers of Mac/ iPad users; the watch is basically an iPhone accessory; and macOS doesn't play all that nicely with android if you're using one of them instead of an iPhone. Taking this into account, the iPhone still probably underpins 75%+ of Apple's revenue, thus milking it for profit at the expense of units sold, rather than nurturing it to keep it growing isn't a sustainable business model.
I think we are forgetting that the iPhone installed base continues to grow even as iPhone sales slow down, mainly due to the sales of 2nd-hand iPhones. A consumer owning a 2nd-hand iPhone can still go on to pair an Apple Watch, sync AirPods, purchase apps and services.
One reason for this is that iPhones tend to hold their resale values better, which can go some way to offsetting the higher price of a new iPhone.
Looking solely at the number of iPhones sold by Apple tells only one part of the entire story.