Wastewater treatment plants (WWTPs) have a continuous electricity demand, generate and consume biogas on-site, and can shift selected process loads. Integrating wind and solar offers new revenue opportunities, but it can also create a generation-demand mismatch that results in renewable curtailment and expensive peak grid imports. We developed a sector-coupled model of a German WWTP with a population equivalent of 200,000 that includes wind, PV, on-site combined heat and power plant (CHP) units, demand-side load curtailment, and a 1MW/1MWh battery. We conducted a comparison of four scenarios (baseline, renewables, flexibility, and battery) under a conventional and a dynamic tariff using one year of measured plant and historical weather records. Renewable generation reduces annual grid imports by 52% to 67% relative to the baseline and raises self-sufficiency from 37% to as high as 79%. The technically optimal setup cuts the peak import by 43%, while the economically optimal configuration yields a positive project annuity of 177.5k€/yr. Adding the battery further raises self-sufficiency but reduces profitability, as the additional savings do not offset the higher capital expenditure. In our case, demand-side flexibility is far more cost-effective than battery storage, and because renewable output coincides with low market prices, dynamic tariffs add little extra value.