What maintenance or other actions can help prevent this for all of us? Sounds like it was unrelated to towing.
If the centering ball is greasable, damn sure keep it greased.
My standard practice is if I have a driveshaft out for any reason and I haven't personally rebuilt it before, I just do it while it's out. It costs about $75 in parts for 3 u joints and a centering yoke and takes 30 minutes.