Optimizing the performance of solid oxide electrolysis cells (SOECs) for long-term hydrogen (H2) production at high temperatures is crucial, as prolonged operation leads to efficiency losses and shorter cell lifespans due to chemical degradation. In this work, we adopt a quasi-steady state approach for dynamic optimization over extended operational periods to address the disparity in timescales between cell operation and degradation. Integrating a 2-D non-isothermal SOEC model with balance-of-plant (BOP) equipment, we explore three optimization objectives: minimizing terminal degradation, maximizing integral efficiency, and minimizing the levelized cost of H2 (LCOH). Our dynamic optimization algorithm reduces LCOH by 9.5% and 16% compared to strategies focusing solely on terminal degradation and integral efficiency, respectively. For electricity prices of 0.03 $/kWh and 0.3 $/kWh, optimal replacement schedules range from 5 to 2 years, depending on the operational mode. Furthermore, a flexible operational mode yields additional improvements in LCOH over traditional galvanostatic and potentiostatic modes.