Hardware wise I think the Samsung S5 was the best phone for hardware. Removable battery water resistant, Micro SD card, most prevalent power cord, etc. It's not fast, but I kept mine when my girlfriend convinced me to switch. In fact I've kept most of my phones.I don't know of anything that I am missing or getting by upgrading from my Samsung Galaxy Note 4 to a Samsung Galaxy S8+. Except I lost a great screen shape/size and removable batteries. And I got a hefty monthly lease payment. I'm kind of over this $800 cellphone crap myself. I kind of wish I had just bought another Note 4 for $250. I already had a collection of batteries. And different backs for hicap batteries too.
The issues for the most part haven't been hardware for a long time, it's mainly support for apps. The Android OS stuff is the most flexible which is good and bad and Apple OS is more stable and efficient, but lacks some flexibility. Also Apple is very limited in terms of hardware IMO and I can't stand all the proprietary stuff.
I read some stuff that the larger population centers of the world are passing on iPhones or at least the new ones. I don't know where to look that stuff up at, but Apple might sell the most phones of any brand or maybe just the most in NA, but Android has a bunch of brands, because it's an open or more open platform.