Germany has condemned oil and gas extraction as “a business whose time is ending,” after Poland reported its largest-ever oil discovery near the countries’ shared border.