AMD Ryzen 1300x is not just equal but much faster than i5 2500k. I would even go so far as to say that you can save up more money by buying a 1200. It can be easily overclocked on the stock cooler to a slightly higher clock than that of 1300x and possibly even more. THese Ryzen coolers are awesome. All this if the ambient temps are lower than 22 degree celsius. See the following review:https://www.anandtech.com/show/11658/the-amd-ryzen-3-1300x-ryzen-3-1200-cpu-review/11
You will notice that a 1200 on stock beats or gets very close to even an i5 Kaby Lake. That too on CPU intensive games such as Civ 6 and AOTS. Please read the whole article to make an informed choice and maybe more articles from reputed sites such as Toms, hardware canucks, overclock 3d etc.
And, your line of thinking is spot on. You can always upgrade to a new AM4 CPU down the line as the motherboard will likely support any new CPU released till 2020. AMD has kept it real simple this time!