I haven't bought a new vehicle since 1998 so can not comment on the lifetime maintenance on vehicles but most vehicles I bought used needed some overdue and preventative maintenance to keep them running well not to mention unplanned repairs.
Most engines have some sort of weakness and reputations but the 6.0L and somewhat the 6.4L might be at the top especially when speaking about diesels. Knowing what I know and have spent on my diesels I wouldn't buy one without knowing their history of recalls, technical bulletins, updates, potential problems and some assurance of where I could get it repaired affordably by someone who has mastered them. Otherwise I would buy new(er) and let the dealership worry about it with the warranty.
To the OP I feel for you being a previous 6.4L owner myself. If the dealership (or someone here) could tell you why the HG blew and reassure you that the cause is resolved now I would agree with those who say to keep it. But it doesn't seem the dealership knows why so unless you are willing to try to find the answer yourself or wait to see if it experiences further issues I would agree maybe you should unload it for your peace of mind.