Refining oil also requires substantial amounts of power. From what I’ve read the power to refine a litre of gasoline e.g. requires as much power as an electric car would need to go the distance 1 litre of gasoline gives you.
Oil refining is very energy intensive, but gasoline production is highly energy positive. Interestingly: atomic process heat for refining could tae a huge chunk of CO2 off our roadways and also improve oil production numbers significantly (20%-ish).