Practical longevity of current Android phones Before continuing to read, please understand that I do not have a smartphone and have never had one. Thus my experience with such devices is minimal.

I am thinking about getting an Android smartphone, but I strongly prefer something that lasts (please don't debate why).  How long do current smartphones stay practically usable?  How long do they last physically, and how long does the software stay reasonably usable?

I do have an iPad 2 (release year: 2011), which at this point is barely usable.  It is in good condition but the (irreversible) OS updates made it slow and many current apps are also so slow as to seriously affect usability.  It used to be the same with computers many years ago, but it isn't so anymore: a 4-5 year old laptop computer holds up perfectly well today, and I see no need to upgrade.  What about current mobile devices?

I am not willing to get a smartphone unless it is likely that it will stay usable for at least 4-5 years.  I'd rather stay with my 6 year old Nokia.  I am not in a position to get a carrier-locked phone, so a getting a quality device would be a significant expense.

To sum up: I am not sure that progress in mobile device performance has already slowed enough to make longevity a reasonable expectation, hence my question.
I second what @DeathMaskSalesman says in the comment - it largely depends on how you use your device and whether you load custom ROMs on it.

Bottom line is, unless you use the phone lightly, nothing can hold up to 5 years nowadays, and even then the battery will wear out. My 3-year-old Nexus 4, when retired at its 2.5 year of service, has its battery down to 1500mAh from the designed 2100mAh. This is increasingly serious a problem since recent smartphones tend to have non-replaceable batteries.