Thermal power units (TPUs) are required to enhance operational flexibility to ensure power grids accommodate the increasing penetration of intermittent renewables. The flexibility enhancement includes increasing peak shaving depth, increasing ramp rate, or both. In electricity-carbon joint markets, increasing peak shaving depth means TPUs can generate less electricity during low-tariff periods while increasing ramp rate means TPUs can respond faster to changes in electricity tariffs. Flexibility enhancement brings additional revenues, but also additional investments. The tradeoff between costs and revenues is important for the construction of sustainable power systems mainly based on renewables, but limited literature models them. To address this gap, variable costs, fixed costs, revenues, and an optimization model for maximum profits are proposed and modeled. Then the economic applicability of different flexibility enhancement aspects is evaluated by comparing the maximum profit increase for a day before and after the flexibility enhancement of TPUs. Furthermore, the profitability of applying different flexibility technologies under the same investments is analyzed, obtaining the optimal flexibility enhancement route. The proposed method is applied to TPUs with different live steam parameters, installed capacities, and reheat stages. Numerical simulations provide detailed economic analysis and optimal flexibility enhancement routes for TPUs in electricity-carbon joint markets.