The world will never run out of oil, ever. We pass over known oil fields all the time because the cost of extraction is more than other sources, and its one of the reason offshore projects that weren't already underway are all getting canceled because there's no point when there is such a massive oversupply of oil right now. Oil will however become gradually more expensive, and eventually it will reach a point where gasoline costs more to manufacture than alternative fuels, including electric.
This will provide an organic smooth technology transition, likely in the form of greater adoption of hybrids that begin to rely less and less on the ICE component of the setup (right now, hybrids get most of their energy from gasoline still).
I feel like you might not have much experience with Europe. The way you describe it is how it would happen in the USA, because people would complain profusely, ignore the government entirely and big businesses would pay them off. Germany might actually be able to pull this off, with their more group-minded culture, less incompetent politicians and stronger environmental awareness. It may get delayed a little, but it will happen and it will probably happen 50 years before it does in the USA.