Wastewater treatment plants need their reliability to be properly assessed to preserve society’s health and availability of water resources. To date, no wastewater treatment plant framework comprehends the reliability of the system, considering the influence of uncertain parameters, and the total costs during the lifespan of the project. Here, an innovative framework combining a reliability analysis, a reliability-sensitivity analysis, and a life-cycle cost assessment is presented as a proof-of-concept tool for reliability-based life-cycle cost optimization of an activated sludge process due to its common application in sanitation worldwide. The results indicate (1) great variability of the reliability scenario due to the influent loads, (2) the sludge volumetric index exerts the most influence on the system’s reliability and risk expenditures, and (3) an optimum scenario associated with the lowest life-cycle cost and an annual failure rate of 19 day of failure year−1 can be obtained via an exhaustive simulation protocol. The framework demonstrates to be a promising tool for techno-economic analysis of activated sludge processes, as well as to optimize project expenditures based on its reliability to withstand different influent loads. This proof-of-concept optimization framework is expected to find multiple applications not only in sanitation and water treatment but also in other industries while supporting sustainable development goals.