There's similarities, and there's homages, and there's "I liked that plot point so much I'm going to use it." JMS alternated between the last two. He wasn't pulling from some deep mythic source in the collective unconscious, he was pulling books off his shelf and going, "Yeah, the wizard falls in Khazad-dum and comes back as more of a strategist, I can use that. 'You cannot pass,' I like that. If I can't work it into dialogue, it'll be a creed or motto or something." That's why the allegation that DS9 ripped him off is so rich. That's how his brain works, so of course he'd think others would do it too.
I will give JMS this: He's got more than just Tolkien and Arthurian legend on his bookshelf. Case in point, the scene where Ivanova, the Jewish officer, tried to pull the First Ones into the Shadow War. In response they just call her
ZOG and disappear. JMS plays up his liberal credentials but it seems he's been secretly based and redpilled since before we had those words.