There are apps that can automate this whole process for you, monitoring the charge your cars needs each night and the dynamic energy prices either on an Economy 7 or Agile tariff and then controls the charging to optimise the price. If you're car needs less charge than your off peak rate time period then it will charge at the lowest carbon times.
https://ev.energy