Self-Healing Factories: AI in Predictive Maintenance and Automated Recovery