What is involved in replacing a 5.2 with a 5.9

Converter should be the same, just need proper 5.9 Magnum flex plate and 5.9 Magnum harmonic balancer. There is two styles; a one piece with integral serpentine pulley, and the two piece that is separate balancer and serpentine pulley. Either setup will work on the same 5.9 Magnum long block, if it doesn't already have one.
Everything on the intake manifold works on either engine, so just make sure the plenum plate is sealed up and swap it over.
The ECM from either engine will run the other engine size as long as they were equipped the same, meaning same transmission style. I have plugged several different ECMs, both 5.2 and 5.9, into my trucks and they will run and drive normal. The only thing nobody can guarantee, unless they tried it, is if you can run that 5.2 ECM on a larger 5.9 engine while towing under heavy load. The camshafts have only very little difference.
The factory ECM tunes were very soft, so I think it would be safe enough, but getting another ECM is cheap and easy. Lots of these trucks in salvage yards. I usually only have to pay $45 bucks for a used ECM, in my area.