A US federal judge has ordered the immediate release of a five-year-old boy and his father from an immigration detention centre in Texas, sharply criticising the government’s handling of the case and the broader deportation strategy behind it.