Sure it can. Venezuela was doing great until it's leader started dipping into the rainy day fund while also not paying into it, and then died, and was succeeded by an imbecile that doesn't seem to actually care if his people literally starve while he eats cake.
Wakanda has magic spirits helping it avoid that kind of leadership stupidity, and a much rarer and more valuable resource than oil, which is found in large quantities in dozens of countries spread around the world. The unrealistic part (other than the spirits and the magical metal, obviously) is the notion that you can be isolationist and gain wealth and advancement like Wakanda has. It doesn't work.
A fantasy version might simply have residuum, or it might have oricalcum, which has some fancy properties that make it worth shipfulls of gold per ounce.
But the point of Wakanda is to have a highly advanced African nation that is unscathed by imperialism. That's easily translated to dnd.