Use of electrochemical storage to enhance energy and cost efficiency of a railway node