A federal judge struck down a Trump-era policy of rapidly expelling migrants from the border in the name of pandemic health precautions.