Comic logic works for supers, whose capabilities should exceed those of humans with firearms.
At the same time in Wakanda we have people charging aliens with spears in their hands. This is, to my nasty suspicious mind, like saying that a writer simply is unable to imagine a technologically advanced civilization in Africa.
Look, they have futuristic buildings, hover cars and led-blinking sci-fi displays, and yet, when they go to fight, all they can do is mass together, raise spears and charge?
That's way beyond lazy imagining...
PS. Here're a few examples of how they could have avoided this tired and lazy troupe of mass-scream-and-charge:
1. The king is effectively a superpowered human, and they need no firearms.
2. Awful equipment is actually high tech, they have lasers, force beams, force shields, and they simply like traditional looks.
3. That mass charge? Well, it was holograms and illusions designed to confound the enemies while the real weapons strike.
I could go on and on. I just happen to think that it is unfair to think about a culture that's supposedly advanced, and yet they still use dark ages mindset when deployed to battlefield. Dune makes an excellent case for justifying existence of melee weapons.