There are currently about 65 million vehicles registered in Germany. If one imagines in a fictive scenario that in the medium term 40 million vehicles are equipped with electric drive and, as it is already achieved today for larger electric vehicles from Porsche, Audi, Tesla, etc., achieve a range of about 500 km, so the battery has a capacity of approx. 100 kWh. In this example, we have 40 million vehicles, each with a capacity of 100 kWh. In this scenario, 4 billion kilowatt hours of energy are stored in the vehicle batteries when they are full. If, for comparison, one looks at how much storage capacity all German pumped-storage hydropower plants have, this number with around 40 million kWh, is only about one percent and is rather small compared with the energy stored in the described vehicle scenario.
The electricity supply of a future electricity mix from renewable energies will be subject to strong fluctuations. Sometimes strong wind blows and it is cloudless, then the PV plants produce power at rated level. But there are also days when the wind blows weak and it is cloudy. Now, the grid-friendly storage systems become very important. Massive expansion of pumped-storage hydropower plants and associated landscape consumption would be difficult to implement, and even with a tenfold increase in the number of pumped-storage hydropower plants, it would still only account for 10% of the energy stored in the vehicles from the above example. Now it is the case that not every car driver needs the full range of his vehicle every day. The vast majority, drive less than 100 km per day and require less than 20% of their car battery capacity. So if the car owners would provide some of their battery capacity for the stability of the grid power, assuming only 25% of the battery capacity, that is already 25 times as much as the total storage capacity of all German pumped-storage hydropower plants together. In a future renewable energy mix, based on these considerations, electromobility will play a crucial role in the energy turnaround, since it is difficult or expensive to provide the necessary storage of the electricity without the electric vehicles. Another example may help to illustrate this better. If you consume 3,600 kWh of electricity per year in your household, which is a fairly typical value for Germany, you will need an average of 10 kWh per day. If your car has 100 kWh capacity in this example, you only need about 10% of that capacity per day in your household. The electric cars would thus be able to ensure the power supply for the households of their owners for a few days and this completely decentralized, even in the situation of a complete failure of the generation capacity. A prerequisite for the injection of energy from the vehicles battery to the grid would be DC charging stations with integrated inverter, in other words: bidirectional charging stations. Such systems are currently in field trials. This technology is also referred to as vehicle-to-grid (V2G) or vehicle-to-home (V2H)  and would be immediately available with the appropriate political will and rapid expansion of PV and electromobility. Bidirectional home or office charging stations were launched in late 2018 and will be available on the market shortly.
But as with PV, there are big or maybe even bigger biases in electromobility, perhaps the biggest first:
"The electric cars cause more CO2 emissions when producing the batteries than they can save during their car lifetime." At this point, again and again, a study from Sweden is quoted, which is basically no study, but a meta-study. This means that the Swedish authors did not investigate anything themselves in 2017, but merely compiled the results of other (even older) studies. Apparently, there were many who have spread this study despite their shortcomings, such as the "Focus". It was also quoted in many other papers and also by politicians, one could almost say, it has spread "viral". However, before political decisions are made on the basis of a poor, now completely outdated study, one should take a closer look at it. Meanwhile, some critical articles have been published that highlight the shortcomings of the study; E.g. in the "Handelsblatt": "Electric car batteries: That's how the myth of 17 tons of CO2  was born”.
The production of lithium batteries requires a lot of energy, but, as with the example of photovoltaics, with increasing production volumes it becomes less and less per battery cell. The energy you need is, above all, energy in the form of electricity. If you now imagine a battery factory, which is operated CO2 neutral with a solar power plant or with a hydroelectric power plant, so the CO2 emission in the production of lithium batteries is very low. This is precisely what Tesla is doing, for example, in its final expansion stage of the so-called "Gigafactory" in Nevada, which is already in operation. The electricity for the production of lithium batteries in this factory is produced almost directly from the solar and wind power plants located directly on (and around the plant). Anything else would be economically nonsense, since the cost of solar power in the Nevada desert are again significantly lower than in the example above in Germany - no other form of energy would be cheaper.
The second big prejudice is the alleged lack of availability of raw materials. Now you need for the production of lithium batteries in addition to lithium carbonate also cobalt. Both are not unproblematic raw materials. The world's lithium reserves are estimated at over 50 million tons. This does not contain lithium, which is dissolved in the sea, at around 240 billion tonnes. In 2017, forty-two thousand tons of lithium were produced. If this consumption stagnated, the reserves would be sufficient for good 1000 years. For the production of a battery for a car with 100 kWh capacity about 10 kg of lithium   are needed. So you could build with the reserves of lithium about 5 billion vehicles. Furthermore, the recycling of lithium (and other raw materials contained in the batteries) from vehicle batteries is also almost entirely possible. Another aspect is the recovery of lithium from the sea water, in particular from the brine, which is obtained in the seawater desalination. Sooner or later, this source will certainly complement lithium production and is the subject of much research. The amount of lithium from the seawater is so large that it can be considered inexhaustible by human standards.
The second often discussed material is cobalt. Cobalt is currently needed in small quantities in the traction batteries (NCO cells) for electric vehicles. For example, VW incorporates batteries in its e-Golf that contain about 10% of cobalt. Tesla installs in its "Model 3" batteries with a cobalt content of less than 3%, so a fraction of it. However, it is by no means the case that cobalt is absolutely necessary for the operation of a battery. There are already many lithium-ion batteries that can operate without cobalt, such as the lithium-iron-phosphate battery, whose higher weight for vehicles, however, is a disadvantage and are therefore used mainly for stationary storage. Therefore, intensive work is being done on the development of cobalt-free drive batteries. The University of Maryland, in partnership with the US military, has recently unveiled a cobalt-free lithium-ion battery that is not only safer, but promises even more than twice the capacity of previous batteries. If you look at the number of publications in this area, the innovation fireworks seem to have just been ignited.
 https://images.homedepot-static.com/catalog/pdfImages/22/2266fab5-0182-44f1-9a71-c8ca2d81398c.pdf (From the proportion of lithium-containing components in the battery can be derived on the atomic weights of the lithium content per kWh storage capacity; The type of battery to which the publication relates is described e.g. installed in the Tesla Model S and X)
 https://www.hs-karlsruhe.de/fileadmin/hska/EIT/Aktuelles/seminar_erneurbare_energien/Sommer_2018/Folien/180418BatteriespeicherVetter.pdf Page 14 - alternative cathodematerials