Coal and oil MAY have has as one of their basis for formation, the conversion of plants and animals that lived millions of years ago, but there is also abiotic means of formation of both coal and petroleum.
Down at the interface between the rocky crust of earth, and the molten interior, there lies a curious formation, the Mohorovicic discontinuity. Much physical and chemical activity takes place here, using supercritical carbon dioxide as a fluid and resulting in the formation of high-carbon compounds both in combination with the monatomic hydrogen, striped of its electron, and as major precipitation of nearly all-carbon layers, as graphite, coal, or even diamonds.
A relatively good grade of crude oil, kerogen, may be made on an industrial scale using a process called Thermal Depolymerization, using hydrous pyrolysis for the reduction of complex organic materials (usually waste products of various sorts, often biomass and plastic) into light crude oil. It mimics the natural geological processes thought to be involved in the production of fossil fuels. Under pressure and heat, long chain polymers of hydrogen, oxygen, and carbon decompose into short-chain petroleum hydrocarbons.
All that is needed is heat and pressure. Heat may be provided by using a concentrated heat source, like Thorium-fueled molten salt atomic reactors (which may also be used for electrical power generation), and in a sealed container which also has some amount of water. The water becomes superheated steam, which provides the pressure, and also, at about 1,000 degrees Fahrenheit, water decomposes into monatomic hydrogen, providing the conditions similar to those found at the Mohorovicic discontinuity. Evolution into petroleum proceeds quite rapidly, often a matter of minutes, depending on the kind of biomass used as feedstock.
We need never run out of petroleum.
My 30 years in the O&G business, starting in reservoir delineation and recovery, agrees with you.