In this study, we discuss how Wireless Sensor Networks (WSN) are susceptible to malicious assaults from malfunctioning nodes, which jeopardise the security of data transmission in crucial applications. We use a Convolutional Neural Network coupled with Fuzzy Logic (CNN-FL) for improved deep learning, introducing a unique method, effectively identifying and categorizing trustworthy and malicious nodes. This is combined with a routing strategy enhanced by the Neuro Genetic Optimizer (NGO), built on the LEACH routing protocol and based on a Roulette wheel selection mechanism. The WSN's lifetime is increased by our suggested routing method, which not only provides safe data transmission but also dramatically reduces latency and energy consumption. Simulation findings show that our technique outperforms current protocols as ASNGSRA, DMCNN, and FRCSROD in terms of packet delivery ratio, energy economy, and latency analysis.