Recent advancements in artificial intelligence, automation, and the Internet of Things (IoT) enable farmers to better monitor and diagnose all agricultural procedures with super-intellectual accuracy. These technologies also contribute to boosting the productivity of agriculture, which increases the countryβs economy. Though these technologies help farmers increase productivity, the detection of plant diseases still needs heightened scrutiny for prevention and cultivation. Plant disease categorization has expanded with the introduction of deep learning algorithms, but it still needs more innovation in terms of accuracy and computing burden. Thus, a novel deep learning model based on capsule networks with firefly optimization and potent multi-layered feedforward prediction networks is proposed in this research. The handcrafted features in this proposed system are optimized before being extracted using a capsule network, which reduces the complexity overhead and is suitable for IoT devices with limited resources. Finally fed to the feed forward layers for better classification. The extensive experimentation has been tested with the Plant Village databases, which contain more than 50,000 images of healthy and infected plants. Performance criteria including recall, specificity, recall, accuracy, and f1-score are used to assess the proposed algorithm's performance. Additionally, its efficiency and computational cost are contrasted with those of other recent models. The suggested model has greater performance (95%) with reduced computing overhead, according to experimental data, which is advantageous for the new prediction approach and the welfare of the farmer