Several people had gathered at the temple to watch a Theyyam performance when the accident took place