Today, in 2022, I'd go with the i7. Difference in Clock and IPC is minuscule at best, but the i7 comes with HT, so all those things that make use of >4 threads will perform better on it, and those who don't care about that many cores won't see much difference.
And depending on the board, you should be able to up the multi a bit on both. Even if it's just the 3.9 GHz 1-core boost with all cores.
Plus cooling shouldn't be an issue, they won't hit the 77W/84W TDP even with a mild oc.
I do recall however that the Motherboards for the 3xxx series intel are just awful with 0 reliability and high price.
If he wants the system to run reliably for years then the i5 is a no brainer. The 4xxx series intel MB are some of the most resilient ever built and they are dirt cheap.
My Z77 board is running fine for the last 8 1/2 years with an oc'ed i5 on it. Bought it new for 90€ back then and it's still perfectly stable.
It all depends on the model I guess. And in case of a used board how the previous owner treated it. Boards also have become more expensive, a board with similar features would set me back at least 160€ for todays platforms.