That's really only been true for Air 2. The Air 2 was the turning point for longevity. Newer iPads, that really depends on how iPadOS advances in future. However, if the past 5 years are any indication, then they're on their way to doing better in terms of longevity.
Still, I wouldn't worry about the Pro 10.5 at all for the next 2 years (unless you're doing super heavy media editing/creation or high-end gaming). I'm running the public beta on my 2017 Pro 12.9 (A10X/4GB same as Pro 10.5) and it feels just as fast as iOS 12 so the next year is pretty much guaranteed good performance.
Personally, I just bought a used 512GB LTE Pro 10.5 with leather sleeve, ASK and Pencil for $650 this year. That should tide me over until 1TB LTE drops to a price I deem more reasonable.