That varies a lot.
Some people's phones last a while, some eventually die.
Windows Phone is a platform, and the only generalization you can make is updates, which doesn't directly mean how long the components will last.
If anything, I would choose a device that's not-too-hard to repair and go from there.
I have a 15-ish year-old Palm PDA on my desk and it is still as usable as it was back then. (albeit technology has moved on without it.) At this moment my main phone is a 5-year-old Palm Pre 2. My sister only recently upgraded from her 4-year-old iPhone 4 which still works well. And there's a Lumia 521 pushing 3 years on my desk that hasn't shown signs of slowing down either.