Metaheuristic optimization algorithms are powerful for solving complex optimization problems, almost when we lack information about the nature of their objective function. Meanwhile, the Finite Element Method (FEM) is a very powerful method for predicting and simulating the behavior of systems subjected to various stresses, whether electrical, thermal, mechanical, vibratory or magnetic. In the current study, we have proposed an optimization methodology that couples a metaheuristic algorithm - the Search and Rescue Algorithm (SAR) - with the finite element method. We then investigated the proposed methodology for optimizing the reliability of solder balls with respect to their geometry in a Ball Grid Array (BGA) assembly subjected to thermal cycling load. First, we performed a sensitivity analysis to determine the parameters influencing solder ball reliability, then we optimized the plastic deformation of solder balls, hence increasing their reliability as a function of their geometry through the proposed methodology, which results in improving the reliability of the entire electronic component.