i5 8600k will have a really hard time reaching 5 GHz, and it will run INCREDIBLY hot under load @ 5GHz. I wouldn't run NH-D14 for that kind of thing, although it really is a good air cooler. It also kinda depends on how the chip handles heat cause each Intel CPU handles heat a little differently than the other. Unless you got a golden chip with good TIM application, you may not find 5GHz conceivable through any cooling system short of custom water cooling.
Your best bet is the very high end water coolers. I'm guessing that a 360mm radiator would be the safest bet if your case supports 360mm rads. You could try with a 240mm but I doubt that the heat will be manageable without the fans being cranked crazily high.