
Electrolysis depends on controlling the voltage and current. Even if it were current-limited, alternating current (AC) would not be appropriate for electrolysis.
DC provides a one-way flow of electrons, ensuring that the same chemical reaction occurs all the time.
If AC was used, the reaction would alternate between forwads and backwards, so there would be no net reaction.