Chemical asphyxiation at petrochemical factories can provoke the unconsciousness or death of factory workers through suffocation. Some chemicals vaporize and mix with air without showing any warning properties that raise the risk of oxygen deficiency. In light of this, Industry 5.0 focuses more on human‐centricity than technology‐driven implementations to ensure secured and work‐friendly environments in industries. Recently, research on factory safety management dependent on the Internet of things (IoT) sensors have been executed unwaveringly. In this work, the ultra‐wideband (UWB) sensor is adopted to recognize the motion and breathing pattern of workers in smart factory scenarios. After capturing the data from the UWB sensor in real‐time, the proposed dataset is further inspected by the deep learning (DL) and traditional machine learning (ML) approaches. Twofold detection schemes are considered where the movement and vital patterns are distinguished first by the stacked ensemble (SE) and the long short‐term memory (LSTM) frameworks. The Bayesian optimized ensemble learning (EL) and bidirectional (Bi‐LSTM) models are further occupied to analyze abnormalities in the breathing rate of a worker in the smart shop floors. The investigated outcome shows that the DL frameworks (LSTM and Bi‐LSTM) outperformed the others by acquiring 99.90% and 99.94% accuracy in 147 s and 293 s, respectively. The devised perception indicates prominent attainment to the smart factory shop floor, Internet of medical things (IoMT), the smart city paradigm, and e‐health appliances.