Over-the-air (OTA) firmware updating has become a fundamental requirement in modern Internet of Things (IoT) deployments, where thousands of heterogeneous embedded devices operate in remote and distributed environments. Manual firmware maintenance in such systems is impractical, costly, and prone to security risks, making automated update mechanisms essential for long-term reliability and lifecycle management. This paper presents a unified OTA update architecture for ESP32-based IoT devices that integrates centralized version control, multi-protocol communication support (Wi-Fi, BLE, Zigbee, LoRa, and GSM), and automated routing of firmware releases across production and development branches. The proposed system enables secure and scalable firmware distribution in heterogeneous IoT networks, with version-compatibility checks, rollback capability, and CI/CD pipeline integration for continuous delivery of embedded software. An analytical model of timing, reliability, and energy consumption is provided, and experimental validation was performed on a fleet of ESP32 devices to evaluate update duration, power usage, and failure resilience. Results confirm reduced update latency compared to native vendor OTA solutions and demonstrate reliability under simultaneous device deployment. The architecture advances automated device maintenance in large-scale IoT systems and establishes a foundation for secure OTA evolution through device-side diagnostics, cryptographic signing, and planned support for bare-metal Rust firmware. This work contributes to scalable, secure, and sustainable lifecycle management for embedded IoT devices in smart-industry, remote sensing, and autonomous infrastructure applications.