IMO you should expect a solid 3 years, 4 on the outside. You're almost certain to get two OS upgrades in that time that will help.
I look at other phones to get an idea of what you should get in terms of if the phone can still be useable.
You look at iPhones, I know people using iPhone 5s still and must be painfully slow but functional and that was released in 2013. I think one major reason is that for a phone that came out with iOS 7 apple has kept providing updates and currently still gets iOS 11. That's 4 years later.
I still have my 6s and actually a 6 I keep for spares and or for other duties like running or mountain biking and other activities with a smaller phone and can say, even though people jab at updates and how buggy they can be, for most part the updates kept the phone relevent and running smoothly and if I had to, I'm sure I'd be ok for at least another year with those phones.
OS updates and changes for Android haven't been as dramatic from year to year like back when I got my first Android with KitKat, and someone running Nougat may not miss the handful of differences in Oreo, but there are also changes that developers may be pushed to make in future releases and they are constantly updating their apps and if you don't have the latest OS that uses them then that's where you end up with issues and you constantly hear of people saying like S7E is janky after a year or Sammys just get worse over time.
I'm hoping that won't be the case. Again I have a Note 8 so I'm in it for the next few years. But I'm personally hoping for a solid 2-3 years.