a gpu will always be a better solution than trying transcode 4k on a cpu.
also remember, cpu generation does matter.
an i7 9xxxx generation, is more powerful than i7 2xxx generation.
You will want to compare cpu benchmarks for any cpus you consider, not only combined core scores, but the individual core score as this will determine performance of single threaded tasks such as audio and subtitle processing.
the best solution is to not transcode 4k at all.
see also @ Plex, 4k, transcoding, and you - aka the rules of 4k - a FAQ