I'm running a 14700K w/ 3070 and to be honest the setup feels a bit unbalanced (though I do more than gaming with the system) - but everything I do runs fine on the 3070 really so I'm not in a hurry to upgrade it but the CPU is definitely outclassing the GPU - however games are just getting to the point where having more than 6 cores / 12 threads (ignore e cores) is useful so personally I'd lean towards either the 14700K or 7800x3D.
7800x3D potentially has a future upgrade path, though not something I'd bet on personally, while LGA1700 is almost certainly not going to see any new major updates, it is a very strong gaming CPU - but those benefits are mostly at 1080p or below - at 1440p or above with high/ultra settings it is within 2-4% of the Intel 14th gen CPUs, where it falls down is non-gaming tasks where it can be 30, even 40%, slower than CPUs it can match or beat in gaming.
9700K shouldn't be a massive bottleneck on the 3070, though it will be a bit - more because newer games are starting to move beyond where 8 threads is enough. I had a 4820K and then a highly clocked Xeon 1650 V2 with my 3070 before upgrading to the 14700K and it is surprising how well they held up, though in CPU limited scenarios they could hold the GPU back by approx. 20% and the 4820K was definitely starting to struggle to stay smooth in some games due to the limitations of 4 core / 8 threads.
Hogwarts Legacy plays much better on 32GB RAM... much better. Though the 3070 doesn't really have the VRAM to run ray tracing in the game smoothly but it isn't a big loss as ray tracing isn't very well implemented anyhow.