Phones with the Apple logo on the back do this job best. Their security posture is just so much better and you don't have carrier-enforced forced obsolescence from the software side. You literally can always run the latest iOS until the hardware _just can't_.
I'm an open source guy only as much as it makes sense.
That means you're not really an open source guy. You're just using whatever is best on the market at the time.
That kind of option doesn't really exist with phones because of market forces. This idea that Android is some better moral choice is a delusion.
If I go apple again, I no longer have the ability to sync my phone, since my Mac died under a glass of wine and I "replaced" it with a Dell Precision 5520 running Arch because the MacBook Pro lineup was untenable.
I'd go apple again if I could actually backup,sync,etc my phone. It's a good device in isolation. But don't dare step out of the apple ecosystem.