This paper introduces a comprehensive thermo-hydro-mechanical (THM) modeling framework tailored for high-temperature aquifer thermal energy storage (HT-ATES) systems. Our framework presents a novel dual-assessment approach that simultaneously evaluates thermal performance and geomechanical stability of HT-ATES systems. The framework combines advanced sensitivity analysis with multi-objective optimization to concurrently boost thermal efficiency and maintain geomechanical safety. The model simulates the cyclic injection-extraction process while capturing the interdependent effects of heat transfer, fluid flow, and mechanical stress evolution. A distance-based Generalized Sensitivity Analysis (DGSA) is applied to identify and rank the most critical parameters influencing system performance and stability, particularly in regions such as the cold well and overlying caprock. Furthermore, surrogate models constructed with eXtreme Gradient Boosting (XGBoost) facilitate a computationally efficient Non-dominated Sorting Genetic Algorithm II (NSGA-II) optimization that investigates the trade-offs between enhancing heat production and minimizing failure risks. Validation against high-fidelity simulations reveals that, compared to a benchmark model with a thermal recovery efficiency of approximately 85% and a caprock slip tendency of 34°, the optimized designs achieve around 88% efficiency and reduce the caprock slip tendency to 29°. These quantitative improvements demonstrate that the proposed framework significantly enhances both energy production and geomechanical stability, offering valuable guidance for the design of robust HT-ATES systems under fixed geological conditions.