Don't forget that you cannot electrolyze an aqueous solution of NaCl, aside from using a mercury cathode. Even then, you have to deal with the separation of your mercury from your sodium. Trying to separate the two isn't easy because the surface area of the amalgam will result in near instant oxidation of your sodium once the Hg has evaporated away unless you do this in a dry box.