Compared to your 2011 iMac, either a 3.8Ghz i5 or 4.2Ghz i7 2017 iMac will be vastly faster on FCPX, especially on H264 material. This is due to the improved Quick Sync logic on the Kaby Lake CPU.

The Geek Bench numbers on the 3.8 Ghz i5 are faster than the 2013 i7 machine, so it's no slouch.

The i5 has the advantage of being quieter when under high load. The fans don't spin up as much as the 2015 or 2017 i7. However this happens less on FCPX than on Adobe software since FCPX is more efficient. With Premiere, just scrolling a 4k H264 timeline causes the fans to spin up. With FCPX it usually takes sustained hard rendering or encoding.

The i7 is hyperthreaded so it has eight virtual CPU cores. On certain software this can improve performance by about 30%. For test purposes I have used a 3rd party utility to disable hyperthreading on my 2017 i7, and for FCPX export it made about 30% difference. For most tasks you probably won't notice it much.

Whether you get the i5 or i7, I suggest getting the top GPU, the 8GB Radeon Pro 580. Also I suggest getting SSD storage. Definitely don't get the 1TB Fusion Drive. I have a 2013 iMac with the 3TB Fusion Drive and it works pretty well. But with video you usually end up using external storage anyway, so even a 3TB drive is usually not enough in the long run.

I would recommend upgrading the SSD to as high as you can afford, while remain the basic level for CPU and memory.
Mine is a late 2014 model and was customized to 512GB SSD and i7, which I don't see much necessary. And 8GB is quite enough for multitasking in most of the situation, trust me.