Synthetic fuels can be created with electricity. But, again, the efficiency is laughable. The amount of energy lost in the conversion is so huge that it's not viable unless you've got crazy levels of overproduction.
But my comparison was about the fact that petrol engines convert only 20-30% of the energy in the fuel to actual motion - everything else is lost in friction and output as heat.
Toyota had a prototype engine that went up all the way to 35-37% efficiency, but it didn't make it to production.
Modern electric engines are 90-95% efficient.