Trump needs to take this to the voters, and then to ask Congress to restrict the appellate jurisdiction of the federal courts, to redraw judicial boundaries, and to appoint conservative jurists.
Good point you raise. And on second thought, I'm thinking that's what he's doing: Letting these fiction-writing judges make themselves and their seat-of-their-pants legal logic into targets. Probing the wound with the angry voters will give him the momentum to make big moves to right the ship as you suggest. As well as getting his way 100 percent on immigration.