Effect of substrate transformations on the kinetics and thermodynamics of electrochemical phase formation