Electrolysis of hydrochloric acid solution