This work proposes an acid-base machine consisting of insertion electrodes for protons and alkaline metal ions placed in electrolytic solutions with different pH values and alkaline ion concentrations to harvest energy from a neutralization reaction. We simulate energy harvesting during acidic wastewater treatment with base (KOH) by using phosphomolybdic acid and nickel hexacyanoferrate as the negative and the positive electrodes, respectively, in aqueous H2SO4 and K2SO4 solutions. In this configuration, the machine harvests energy from a change in the free energy related to changes in the proton and in the potassium ion concentrations after neutralization reactions, with feedback from the saline solution resulting from neutralization. The electrochemical impedance spectroscopy diagrams provide insight into the practical proton and potassium ion electroinsertion reversibility in acidic and neutral media. Based on the charge/discharge curves at pH = 2 and pH = 5.8, the acid-base machine harvests ca. 10 kJ per mol of electro-inserted protons in the first cycles. These results demonstrate that the methodology is viable for sustainable growth—it can harvest energy from wastewater treatment, a practice that can be especially profitable for the industrial sector, which produces great amounts of wastewater.