Technically the 6kWh of energy spent on refining (or any other work) is itself subject to inefficiencies in generation, transmission, etc. It would also suffer from inefficiencies in the electrical storage and motive portions of an electric vehicle as well. And at the end of the day even if there were perfect 100% conversion it would still only be 6kWh of energy available vs 33-34kWh.
Regarding the 6kWh number, I have been having a lot of trouble confirming it. Some stuff I have read says that refineries are major consumers of grid electricity. Others claim that they can produce most of their energy needs from the oil distillates on-site. My best guess is that it probably depends on how old the refinery is, because it seems like the older reports/estimates tend to mention the electricity consumption, whereas the newer ones mention the 'on-site' energy generation/consumption. I think a lot of the energy demand of the refinery is used for heating, so burning the oil distillates would be way more efficient than using grid electricity for that. So, it may just be the case that older refineries are way less efficient than newer ones, and the 'EV vs ICE' comparison depends on how modern the refineries are in your area.
[1] https://www.reuters.com/article/us-autos-emissions/u-s-vehic...
Which gives to a mere 4Wh of additional power extracted from gasoline.