This article addresses challenges in the design of underground high-voltage transmission lines, focusing on thermal management and cable ampacity determination. It introduces an innovative proposal that adjusts the dimensions of the backfill to enhance ampacity, contrasting with the conventional approach of increasing the core cable’s cross-sectional area. The methodology employs a particle swarm optimization (PSO) technique with adaptive penalization and restart strategies, implemented in MATLAB for parameter autoadaptation. The article emphasizes more efficient solutions than traditional PSO, showcasing improved convergence and precise results (success probability of 66.1%). While traditional PSO is 81% faster, the proposed PSO stands out for its accuracy. The inclusion of thermal backfill results in an 18.45% increase in cable ampacity, considering variations in soil thermal resistivity, backfill properties, and ambient temperature. Additionally, a sensitivity analysis was conducted, revealing conservative values that support the proposal’s robustness. This approach emerges as a crucial tool for underground installation, contributing to continuous ampacity improvement and highlighting its impact on decision making in energy systems.