H.264 is a very demanding interframe codec which requires the CPU to do most of the brute force encoding and decoding. Adobe Premiere is somewhat efficient as well as with Davinci Resolve which rely on most of the cores available plus some use of the GPU to encode h.264. Which is why you are seeing some speed improvements with Adobe compared to FCPX. It is not to say that you can not speed up FCPX for h.264 encoding; it's that it needs a software called Compressor to help encode to h.264 faster and FCPX and Compressor both work seamlessly as it supposed to be. With Adobe Premiere, people use Adobe Media Encoder to encode to h.264 faster.
The problem with the GPU is that, it is not meant to handle the variable GOP interframe footage of compressed h.264 efficiently as it does with a multi-core/multi-thread capable CPU (6 cores and up) and therefore your final output may suffer in quality. GPU encoded h.264 final product, while fast is usually inferior to CPU encoded h.264 footage. So you would prefer to have a blend of CPU and GPU. The GPU portion of the encoding is for the rendering of titles and the LUTs applied, so having a faster GPU can help the overall h.264 encoding experience if you have a heavy use of renders and LUTs in your movie.
With Core i series CPUs, they have this feature called Quicksync which helps encode h.264 material much faster than the CPU process without sacrificing a lot in quality. And that is actually my approach. I use my Mac Pro 5,1 with the RX580 GPU to edit my h.264 footage and then save it in Resolve archive format into my Mac Mini server. Then I just use my Macbook Air to load the resolve archive format and then render it to h.264 via Quicksync. Starting with the Haswell CPU and onwards to Coffee Lake (late Mini 2018), you can use Quicksync to encode h.264 material and preserve quality at the same time. There is very little difference between CPU encoded vs Quicksync, but I could get 1:1 encoding with my Macbook Air without a GPU, whereas with my Dual 8 core Xeons 1:1.7 -- meaning a 1 hr 4k footage to 1080p HD takes 51 mins to encode on the Air and 1 hr and 51 mins with my Mac Pro with dual 8 core Xeons. I do not use GPU encoding alone as the quality suffers somewhat in exchange for greater encoding speed and I don't save to an intermediate intraframe codec like Pro Res from h.264 to create proxies, because doing that would introduce a generational loss. So I would prefer less conversion to preserve quality.