I had a trans case bead blasted by an auto electric shop. I washed it several times in a plastic tub with dish soap. I dried it with air, then put it in the oven at 250F for a half hour to drive any remaining moisture out. Primed then painted it black. I think I even cleared it. The finish still looks good about ten or more years later.
That worked out well.
Recently I did another one, but used a sand blaster. I blasted it with a pressure washer inside and out, then did the same soapy water, air, and oven treatment. Painted it all up and it's now in the race car.
I think it's important to keep moisture away from magnesium, corrosion will do you in eventually. Magnesium corrodes worse than aluminum with moisture exposure.
For an engine case I would NOT use sand, too many oil passages for debris to come back and haunt you later. But honestly a transmission case is wide open and there is no place for sand to hide. DO NOT sandblast any machined surfaces.