Court defiance is not even necessary. All he has to do is declare martial law in a zone at the border. In a true national emergency, in the face of an invasion, it would be necessary and constitutional.
Why doesn't he? He lets Nancy and these rogue judges walk all over him. And even his DHS Secretary McAleenan is soft. He didn't want to deport people.