In this study, an improved version of Aquila Optimizer (AO) known as EHAOMPA has been developed by using the Marine Predators Algorithm (MPA). MPA is a recent and well-behaved optimizer with a unique memory saving and FADs mechanism. At the same time, it suffers from various defects such as inadequate global search, sluggish convergence, and stagnation of local optima. However, AO has contented robust global exploration capability, fast convergence speed, and high search efficiency. Thus, the proposed EHAOMPA aims to complement the shortcomings of AO and MPA while bringing new features. Specifically, the representative-based hunting technique is incorporated into the exploration stage to enhance population diversity. At the same time, random opposition-based learning (ROBL) is introduced into the exploitation stage to prevent the optimizer from sticking to local optima. This study tests the performance of EHAOMPA's on twenty-three standard mathematical benchmark functions, 29 complex test functions from the CEC2017 test suite, six constrained industrial engineering design problems, and a CNN-hyperparameter optimization for COVID-19 CT-image detection problem. EHAOMPA is compared with four existing optimization algorithm types, achieving the best performance on both numerical and practical issues. Compared to other methods, the test function results demonstrate that EHAOMPA exhibits a more potent global search capability, a higher convergence rate, increased accuracy, and an improved ability to avoid local optima. The excellent experimental results in practical problems indicate that the developed EHAOMPA has great potential in solving real-world optimization problems. The combination of multiple strategies can effectively improve the performance of the algorithm. The source code of the EHAOMPA is publicly available at https://github.com/WangShuang92/EHAOMPA.