Electrochemical reduction of polymeric carbon