The 3G got me into the iPhone market, but it was too underpowered to be usable for very long. Every iPhone since has been handed down and got at least 4 years worth of usage. The improvements in the 3GS would probably have held up better. At least Apple sold it longer.
The X has been the best so far. Of course, I don't know long term reliability (the 6 had to have battery replaced within 2 years, a hand me down 5, bought new, had battery expand last summer).
Most of the other issues with cell phones have to do with carrier and band support. Already, my X doesn't support all the LTE bands that ATT uses (I'm back on ATT), or T-Mobile (my sister uses). The phones aren't future proof in carrier support . It is hard enough to support everything that is out there by the time the phone releases.