> someone working there legally
There is literally zero evidence that he's working here (Thailand) legally. The article only says he works here, at a school.
That immigration police arrested him rather than "regular" police, suggests that his employment may not be above board.