This study aims to optimize the coagulation process for treating wastewater produced from petroleum drilling. The research includes redesigning the flocculator to enhance the coagulation process. The initial quality of the wastewater, characterized by parameters such as turbidity and Total Suspended Solids (TSS), did not meet the environmental quality standards stipulated by the Indonesian government. Poly Aluminum Chloride (PAC) coagulant and Polyacrylic Acid (PAA) flocculant were utilized at varying doses of 10–150 ppm and 0.25–25 ppm, respectively. The study identified the key challenges in the current coagulation and flocculation processes, including inefficiencies in pollutant removal and high operational costs. Optimal doses of 10 ppm for coagulants and 0.25 ppm for flocculants were determined, resulting in daily operational cost savings of IDR 15,865,030. The economic analysis was conducted to project the potential cost savings based on the optimized dosages, indicating a reduction in chemical costs and operational expenses. Moreover, the optimal injection distance for PAA flocculant was found to be approximately 3.5 meters from the static mixer. A new design for the flocculator was proposed, incorporating these findings to improve the overall treatment efficiency. The redesigned flocculator prototype features a 6-meter-long horizontal tube, 1.5 meters in diameter, with 15 partitions spaced 40 cm apart, and a water level difference between the inlet and outlet of around 0.67 cm. These findings suggest that coagulation redesign and optimization, along with clarifier engineering, can significantly reduce operational costs and enhance water quality for injection into the earth.