if the US treasury said that it was restructuring the USD such that there would be 21 million MegaDollars maximum, but that each of those MegaDollars could be dived up to infinity, does it suddenly become sound money?
Assuming their promise was credible (which is an insane assumption but for the sake of argument), yes! It would be as good as sound money. Divisibility makes absolutely no difference. Your 0.008 megadollars still represent a certain slice of the pie, no matter how finely you subdivide that slice.
Regardless of the valuation of each megadollar? Let's say each megadollar was equal to 1 trillion USD? Still sound?
Since the scenario is that the USD has been restructured, there is no "dollar" anymore, just megadollars, so I assume you mean that each megadollar has the same purchasing power as $1 trillion in today's dollars (note this is something that can't be decreed but only decided by the market). If that's what you mean, then yes, it is entirely sound given the government is somehow guaranteed not to issue more than 21 million megadollars. You could buy Google for 0.1 megadollars, a mansion for 0.00001 megadollars, a decent house or Lambo for 0.0000001 megadollars, a nice TV for 0.000000001 megadollars, lunch for 0.00000000001 megadollars, and a gumball for 0.0000000000001 megadollars.