22REs don't have head gasket problems... it's
The cylinder heads on 22REs go bad, NOT the head gasket as with junk Toyota V-6. This is due two issues in my opinion:
1) Coolant passages are located too close to cylinder chambers.
2) Toyota Aluminum casting is inferior due to visual porosity and foreign material introduced in the sand casting process. Possible inferior aluminum alloy is used by Toyota to cut costs as well as they don't or didn't know what the f they were doing pouring cast aluminum.
The only solution is to remove the cylinder head and weld repair and re-surface the cylinder head. Detection of the bad area is difficult and best left to a cylinder head professional. On my personal junk 22RE that's been weld repaired twice since new (now has about 180K miles since brand new, 1988) my cylinder head guy and I decided to weld up two or three (maybe 4) "blind" passages in the head that are also close to cylinder chambers. I think they are there to aid in cleaning and drainage when the garbage head is off, and not all that necessary as the gasket blocks them off anyway. This last repair has held for about 25K miles now, but the truck and engine lower end have fallen apart (burning lots of oil although I put a front main seal repair kit in) and are no longer road worthy. I use it for hauling rocks and wood on my property. It's a cheap "John Deer Gator" now and works okay for this.
On a side note, I have easily spent way more of my time working on my junk Toyota SR5 extended cab 4x4 than any other vehicle I've ever owed. Not only is it the worst quality vehicle with the fewest recalls of things that should have been recalled of anything I've ever owned, It is NOT an "off road" vehicle, no matter what others think. The weakest link is the bogus clutch that Toyota put in. It will burn out on any steep hill in 4x4 low range with your foot completely off the clutch.
Any inline 6 (except Toyota) is the best for off road so why bother with anything else. Get a Jeep or Chevy.... seriously.