Only about half of oil production goes to energy and transportation. The other half goes to production of synthetic materials like plastic. Look around you, oil production is not going away any time soon.
Only more reasons to stop using oil for energy and transportation - we need it for plastics.
I thought refining of oil was mostly separating the different hydrocarbons- or can gasoline be used to make plastic?
You can "crack" or "reform" any hydrocarbon to any other at the cost of some energy. Plastic tends to be ethane -> polyethylene, and the like. The fraction called "naptha" which is between ethane and gasoline in refining tends to be used as chemical feedstock.