This paper offers a fresh perspective to memory allocation in edge-PLCs within industrial IoT environments, leveraging a hybrid a structure that incorporates Deep Q-Networks (DQN) and Bidirectional Long Short-Term Memory Networks (BiLSTM), complemented by Quantum Genetic Algorithm Optimization. In addressing the dynamic challenges of memory management, our method combines the reinforcement learning capabilities of DQN with the temporal contextualization provided by BiLSTM networks. The DQN component learns to optimize memory allocation policies based on immediate rewards and feedback, while the BiLSTM network captures long-term dependencies in data, enhancing predictive modeling for future data arrival rates. Moreover, we introduce Quantum Genetic Algorithm Optimization, a cutting-edge approach that infuses quantum-inspired principles into the traditional genetic algorithm framework, to further refine the memory allocation process. By leveraging principles of quantum computing, this optimization algorithm explores the solution space more efficiently, allowing for faster convergence and improved performance. Through simulation experiments, we exhibit the potency of our hybrid approach in reducing data loss probability and enhancing system performance in edge-PLCs. Our findings underscore the significance of integrating advanced machine learning techniques with quantum-inspired optimization algorithms to address complex challenges in industrial IoT environments, offering a promising avenue for enhancing memory allocation efficiency in edge computing systems.