You assert:
Is it correct that anions give their extra electrons to the anode, which transfers the electrons to the cathode, where the cations receive them?
...which is correct. You seem to be concerned that it is not an eternal circuit when you then note:
In addition - if my understanding is correct, then very soon all the ions will neutralize (the cations will gain the electrons, the anions will lose theirs) and the flow of electrons will stop?
which is also factual. There is no problem with the circuit running out of ions if not replenished, since the purpose of electrolysis is either:
- to produce another substance by applying electrodes to a solution, such as generating hydrogen (and oxygen) from water using electricity;
- or to produce electrical energy by combining two substances such as hydrogen and oxygen in what is known as a galvanic cell.