Preventing THErmal ATtacks using AI-driven Approaches