Wanhao i3 stops printing after about 40 minutes
Time to check things that usually don't need checking.  At this point I would check the power split. 

Check the power supply voltage (+12V or maybe +24V, I don't know the printer) at the controller before and after the extrusion stops or sputters.   Assure that the voltage stays the same.   If it drops you have a culprit.  While there, also check the +5V.  If the power is inconsistent,  check the connections for loose screws.  If the power is also bad at the supply,  replace it. 

If the extruder starts clicking,  it could be under voltage or under temperature.  You have already checked for heat creep, and not found it.  Either supply voltage can mess with actual temperature.

You have ruled out Z-height, so many possibilities are unlikely.