The electrochemical impact on electrostatic modulation of the metal-insulator transition in nickelates