It's not magical thinking, landfill mining has been in-use since the 1950s: https://en.wikipedia.org/wiki/Landfill_mining
If certain resources do get more sparse, it will easily become economically viable to expand landfill mining and we already have the technology required to do so. At the end of the day, it's an energy question more than anything. With cheap solar plus the fact that landfills produce their own free energy (methane) there is no need to be alarmist and consider them a threat to our species.