Q: would it be better to replace the engine or fix a warped head and head gasket? on 2004 Dodge Ram 1500

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
My husband's 2004 Dodge Ram 1500 with a 5.7 L engine was ran hot. The water is mixed in with the oil, we found this out after we started to pull the parts off the engine to get to the heads. He has been informed by a few mechanics that it might be better to just go ahead and replace the engine instead of fixing the heads if they are warped, as it is very likely to warp them again without over heating first. Would it be better to replace the engine or to replace the head gasket and fix the warped heads?
(1) Answer
warped head just needs to be machined if their is no further damage from the heat. after that they will be okay. new heads are not intended to be machined but the parts store i work at does it all the time. however asking someone for the speck is like pulling teeth. so .005 is the clearance on this head.