The president has the power to respond to emergencies under the Emergency Decl act of 1974. The congress has the right to over rule the declaration. They tried and failed.
There is no role for the judiciary in emergency declarations. You can’t provide for the national defense of 200 federal judges can individually or in small panels overrule the president who its commander-in-chief.
The president should stop responding to the court and make a statement, but starting with the immigration restrictions from terrorist counties he had deferred to the courts on matters of national security.
What will he do when the USSC votes 5-4 to not fund the wall?
Read post 19. An emergence declaration was not overridden by Congress. Judiciary response was neutered by that 1974 law. There is no justification by any court decision to block any wall construction.