A method for protecting the coalescer elements of an electrostatic coalescer device against electrically induced erosion and/or partial discharges during the operation of the electrostatic coalescer device comprising the following steps: a) providing an electrostatic coalescer device comprising a vessel which contains at least two coalescer elements, wherein each coalescer element comprises an electrode, which is enclosed by an electrical insulation, b) feeding a water/oil mixture or a gas/water/oil mixture into the vessel, c) supplying AC voltage to the electrodes of the at least two coalescer elements, thereby separating the water/oil mixture into an oil phase and a water phase or separating the gas/water/oil mixture into a gas phase, an oil phase and a water phase, d) time-resolved determining the electrical impedance of the electrode of at least one of the coalescer elements and determining, whether the electrical impedance of the electrode has been changed within a predetermined time period by more than a predetermined threshold and, if so, quenching or reducing the voltage supplied to the electrode to at most 70% of the AC voltage supplied to the electrode at the point of time of determining the change of the electrical impedance of the electrode until the change of the electrical impedance of the electrode lies within a predetermined range and/or until the electrical impedance of the electrode lies within a predetermined range, wherein the length of the predetermined time period in step d) for the change of the electrical impedance is at most 1 second, and wherein the predetermined threshold in step d) for the change of the electrical impedance in the predetermined time period is a change of the electrical impedance of at least 0.25%. a) providing an electrostatic coalescer device comprising a vessel which contains at least two coalescer elements, wherein each coalescer element comprises an electrode, which is enclosed by an electrical insulation, b) feeding a water/oil mixture or a gas/water/oil mixture into the vessel, c) supplying AC voltage to the electrodes of the at least two coalescer elements, thereby separating the water/oil mixture into an oil phase and a water phase or separating the gas/water/oil mixture into a gas phase, an oil phase and a water phase, d) time-resolved determining the electrical impedance of the electrode of at least one of the coalescer elements and determining, whether the electrical impedance of the electrode has been changed within a predetermined time period by more than a predetermined threshold and, if so, quenching or reducing the voltage supplied to the electrode to at most 70% of the AC voltage supplied to the electrode at the point of time of determining the change of the electrical impedance of the electrode until the change of the electrical impedance of the electrode lies within a predetermined range and/or until the electrical impedance of the electrode lies within a predetermined range, wherein the length of the predetermined time period in step d) for the change of the electrical impedance is at most 1 second, and wherein the predetermined threshold in step d) for the change of the electrical impedance in the predetermined time period is a change of the electrical impedance of at least 0.25%.