9700k IMO, because of how hyperthreading works. Each of the extra threads is optimistically, about 45-50% of the power of a "true core" from there, we can do some maffs and see an incredibly rough idea of the total performance each chip could output in a full load scenario (all other factors being equal)
6*1 + 6*0.5 = 9
The theoretical lead with an 8700k becomes slim, right? But now we add in three major factors - IPC, clockspeed and latency. The 9700k will have higher IPC/clockspeed, and lower latency as there are less cores to divvy up the work. The 8700k wins out in situations that require a lot of instances with less of a speed requirement, but that is definitely not your usecase.