The 1998-2001 Ram 1500 was a decent truck, but was mostly behind the pack as far as technology and fuel economy. The 5.2 and 5.9 tend to get pretty bad gas mileage, but are very reliable if cared for. So is the 3.9. They are all "Magnum" descendants of the old LA engines. Hard to beat an all iron pushrod engine for durability. I've seen a 1998 5.9 experience a catastrophic head gasket blowout while towing a trailer, but it was already badly beaten and neglected at that point...hard to just blame it on the truck. The automatic transmissions are a weak point for those years and I would go manual if possible. The dashboards were prone to cracking and eventually developing a massive hole during these years in hot climates. Something like a 3.9, manual, 2WD Ram ST that some old guy had will probably go forever.
2002-on was much more refined, but still used the 5.9 for a year. I'm not sure if early ones still had trans issues, but I know whenever they went to 5-speed autos that pretty much stopped. The 4.7 is good, but a Quad Cab 4x4 is pushing it. I drove an '06 4.7 4x4 Quad Cab rental extensively for a couple days. It had enough power empty, but it wasn't a rocket and with a heavy load or trailer it would probably be overworked. At the end of the second day of driving it, something went very wrong...CEL came on, engine lost power, and it got LOUD. Not sure what happened, maybe an exhaust manifold gasket blowout. I wasn't beating on it, I was just cruising along at about 35 MPH when it happened. I was able to limp it another hundred miles or so back to the rental company. I liked the truck otherwise. It had SLT trim and was pretty comfortable. Build quality seemed good, but it did have some cheapo stuff like awful fake wood around the radio.
I would not get the 3.7 in anything other than a regular cab 2WD, and even then you should probably just get the 4.7. The 3.7 is adequate in a Liberty, not so much in a Ram. A friend of mine had an '03 3.7 auto 2WD regular cab, and while it got around okay and was reliable, it was definitely the bare minimum amount of engine you could get away with in a truck that size and weight. That Ram never hauled a load larger than a small motorcycle. Dodge did build 3.7 Quad Cab automatics, I have seen a few. Would definitely avoid that one, especially if you haul anything.
Overall, they are good trucks, you just need to look for the more desirable engine and transmission combos.