A teacher was able to film himself abusing young girls because of a "lamentable failure" by school management, a review finds.