I personally don’t believe that Apple uses repair and services as a money generator. I’d guess that the money they make on stuff like that is basically a rounding error for them, accounting for less than 1% of revenue. However, it does make sense that Apple wants to have more control over who repairs iPhones and what parts they can use because this greatly affects the user experience if it isn’t done well. And even if it’s a repairer’s fault, customers will probably blame Apple.
Also, there are two ways to look at Apple raising iPhone prices. One is, like you said, that Apple is simply charging more for the same thing. The other is that they are charging more for something that actually costs more. Those dot projectors for Face ID, which no other phonemaker uses and increases the reliability and security of the system, are more expensive than fingerprint readers. The OLED and stainless steel on iPhone XS cost more than LCD and aluminum on XR. Designing custom silicon that’s the best in the industry probably costs more than buying chips from Qualcomm.
Apple makes premium products with a commensurate price, and I think it’s possible to eventually reach a plateau with that market where there are few new users left to get aside from people buying their first phones. I don’t think that’s necessarily Apple’s fault — there are some people who will never think that the Apple premium is worth it because they either don’t have the money to pay it or don’t believe they get anything for it, which I think is wrong considering Apple’s hardware and software quality, reliability, security, as well as its customer service. It’s true that the Pixel 3 is competitive in many respects, and most of the major apps you use on an iPhone will work fineon Android. But it doesn’t account for other factors, like whether all your family uses iMessage and FaceTime, whether you want your device to sync with your other Apple devices, Google wanting all your data all the time, and the fact that you can’t walk into an Android store for help or to learn how to better use your apps. All that stuff really matters, but it’s rarely talked about in reviews or when comparing specs. Switching OSes is a big deal, which is why most people don’t even consider it.