Leaving aside that neither Musk nor Trump would be eligible for those positions
Those are both very bad trades. Alaska is much more valuable than Greenland, with 13 times the population and twenty times the GDP as well as a more strategic location. And while the Panama Canal is very important, its revenue is only about $5bn a year. Contrastingly, Disney generates over $6bn a year in tax revenue in Florida alone.
I especially don't see Trump giving away Florida, which is now his home state, where Mar-a-Lago is.
Now, while on paper Panama and Denmark would "gain" from these trades, I don't think they'd want them either. It would be very difficult for them to administer these territories, especially given the residents will consider themselves American. The Florida-US border would be very porous, with undocumented immigrants flooding into Alabama and Georgia in their millions.