Primary school students were allegedly filmed on spy cameras using the bathroom by a teacher who is accused of producing hundreds of child abuse videos.