Is your comment to say that cobalt should simply be more expensive to compensate for the negative externalities of obtaining it?
As cheaper sources are exhausted, the more expensive ones become viable. So we won't run out on the projected time horizon.
The main reason why US and Australian rare earth production has gone away is because Chinese sources are so much cheaper (aka no pollution or safety regs). No production, no exploration, and no development of rare earth sources.
As cheap production goes away, people again look for, build, and use other sources.
Planning on a backup plan and providing large numbers of jobs through factories to increase the value of labor in these places is a much better way to increase the standard of living other without installing socialist governments.