The threat of a Texas Education Agency takeover was triggered by one of the North Texas district’s schools that had been underperforming for years.