Air cooling is always the limitation, and more so with higher core count. 5GHz may be too high a target. The real culprit is core voltage - heat rises with voltage squared at constant clock speed. First try to reduce voltage to see if heat-induced blue screens stop and/or temperatures come down. It would be good to have stress test temperature under 80C.
I suggest trying 4.5 - 4.6 GHz with lower core voltage. Adjust voltage in .02 volt steps -- up if unstable or down to find the lowest voltage that works when it is stable. Save a profile that works, then try the next higher multiplier and adjust voltage as before. Rinse and repeat until you find a good clock/voltage profile. Watch that temperature, and don't use a setting that goes over 80C.
Keep a 2 or 3x multiplier setback for AVX instructions set in BIOS. Clock will be lower in parts of the test that use AVX, but that's better than a huge temperature spike that happens otherwise. The setback lets non-AVX software run at higher speed at the same core volts.