You already pretty much summed it up…
Transcoding 4K material is (still) pretty taxing – even for modern CPUs.
From what I can find, the 5600x has a PassMark benchmark score of approx. 22000. That should be sufficient for a high quality HDR transcode (requires approx. 17000).
It’s best to avoid Trans coding where possible by collecting suitable files for your devices. The dashboard is a very useful tool in the Plex media server to help understand Trans coding.