It is true that there should be more done about using cobalt and to a lesser extent lithium, but even with those issues it is better in the long run. There are companies that are focusing on recycling those minerals and new battery chemistry is moving away from cobalt.
As far as fires go, yes battery fires can be very hard to contain. That being said, EVs catch fire far less often than ICE cars.