Hello and welcome to jeeps.com. You've done quite a bit of work already but I believe it time to focus on the cooling system . Is the electric fan working with a/c on and when the temperature raises above 210 degrees ? Have you checked the condition of the clutch fan ? Knowing that the cylinder head gasket was replaced , there were no cracks in the head ? Compression good in all cylinders ? The radiator clear ? Radiator hoses not collapsing ? The water pump is the correct rotation ? These water pumps are reverse flow. It should be stamped on the pump. No restrictions through the heater core hoses ? Those hoses will hold back hot water and not allow circulation causing this issue. If you have an infrared thermometer ( the hand held type ) , you can find hot spots that are abnormal such as hoses hotter than other hoses . You can also look for exhaust manifold heat that is hotter from one cylinder to another. If you feel the head gasket job had no effect on the overheating and the condition has not worsened and the cylinder compression readings are close in readings and satisfactory overall then it stands to reason the problem with be within the cooling system. As far as shutting down , that is the PCM killing the spark and fuel via the auto shutdown relay ( ASD ) to prevent further damage to the engine when overheat or oil pressure is low. That is normal. Good that the ASD is working. Hope this gives some insight to start looking and hope your problem is found soon and that it is a simple one. When you can , please post back your findings . Thank you for your membership here at jeeps.com
The reason I mention reverse flow in relation to the water pump is because if at some point a previous owner installed a water pump that is actually for a 258 engine , they were not reverse flow . The 258 engine has a different cylinder head design that the 242 (4.0) . If the hot water that is supposed to flow to the radiator to be cooled flows back toward the engine , hot water will travel through the cylinder head and cause overheating. Incidently , is the thermostat in good working order ?
Also , has all the air pockets been worked out of the cooling system ? Air pockets will real havoc this way . Jack the front up or put it on ramps and with the engine cold and radiator cap open , squeeze the lower hose vigorously to help circulate coolant into the engine keeping the radiator level full . When your sure you've got all the air out you can , run the engine to allow circulation again keeping level topped off.