I get not wanting to repeat past experiences, but your experience with the Core i7 7700 had some unique conditions to it.
The first quad core CPUs launched in the mid 2000s, not really all that long after dual core CPUs did. Hex cores existed since 2010, but they stayed on HEDT platforms. On consumer platforms, things stagnated at four cores for a long time.
A large part of the reason was because AMD wasn't competing well with Intel. Once Ryzen launched and Intel realized AMD had suddenly gained a lot of ground, you saw the panic response of the 8th, 9th, and 10th generations consecutively increase core/thread counts, after being stuck on a maximum of 4 cores for seven Core i generations, and the previous two Core 2 generations.
If you graphed this, it would mean the line went flat for nine generations and then up fast over the course of the next three. The result is that the CPUs in the latter generations right before that core/thread count uplift aged the worst. And the Core i7 7700 is precisely the one that was the worst off here.
This is part of why Sandy Bridge, and to an extent, Ivy Bridge and Haswell, aged the best from those times. They weren't immediately before that rapid uplift, and per core performance also slower after Sandy Bridge.
As someone else said, you can't future proof. By time more than 8 cores/16 threads are needed often enough, faster CPUs will exist. The 7950X3D will be hurt by CCD to CCD latency and the fact that only half of it has v-cache may further negate a lot of its benefits for games using many cores. We saw the same thing with the first Core 2 Quads; they weren't monolithic quad core CPUs but were a pair of Core 2 Duos communicating over the slow FSB. This is part of why the early Core i quad core CPUs aged so much better than them.
The 9900X will have a bit of the same problem as it's also multiple CCDs (and worse, it's only six cores per CCD opposed to the other two, which are eight). You might argue that even with a latency penalty, it will outpaces less cores anyway, and that may be true, but how far into the future does this happen? And how much is the uplift from having over 8/16 at that point? And does that happen soon enough to offset less performance in most other games until then?
The Ryzen 9s are multi-threaded productivity first, and it's best to treat them as such in my opinion as opposed to "future proof gaming answers". For games, a Ryzen 7 (especially since the inception of the v-cache models) is almost always a better option since it's cheaper (or maybe a similar cost to the cheapest Ryzen 9) at much better performance. I was confused as to how many people were even needing to ask "5900X or 5800X3D" when the latter launched. It was always obvious to me.
If you want a deeper look, much of gaming will target consoles. Right now, they are 8/16 affairs and this generation will likely last another three or so years. Even if the next consoles bump that up, if this generation is anything to go by, it will be some time before future games need that many. I mean, today a 6/12 is fine for most anything. Developers aren't going to target something if only a minority have it. No, the 7800X3D might not be the fastest thing around in 3 or 4+ years, but nor will the 9900X or 7950X3D either. But none will be slow either.
As someone else said, buy for today with a little bit of reasonable thought put into near tomorrow.