But if you make the judges you don't like illegitimate the other side will do the same and eventually it won't matter
Trump is so far complying with the law in this matter. He can't change it IMO. He can try, he will destroy himself, us, and the nation in the process. Legally his one option is to appeal the order, all the way up to the USSC if necessary.
I think the law is on Trump's side, to be perfectly honest.
Any of his underlings that complied with a Trump order to disobey the judge would be setting themselves up for jail terms. Just read that 60 people from Nixon's cabinet did jail time.
Trump usually does try to make sure things are legal even if he won't publicly keep quiet about it.
Trump is a man with a lot to lose. If he resigns from the Presidency in disgrace like Nixon his real estate empire will no doubt come crumbling down with his Presidency and he'd be an utterly ruined man.
Trump is crazy, but I don't think he's that crazy. I hope I'm not wrong.