I repeat yet again: It is certainly true that McCoy probably didn't mean it that way. It is not, however, valid to assert that nobody could possibly mean it that way. General and specific argument are two separate things.
No, it's just a standard adventure-story plot beat. Don't attribute everything in TOS to "GR" -- the show was much more freelancer-driven than modern shows. A lot of its writers were just general TV writers, and they recycled a lot of standard adventure tropes superficially dressed up with sci-fi trappings. A lot of TOS's aliens perpetuated the stock Orientalist or tribal stereotypes in Western fiction, including the recurring trope of primitive tribes that worshipped false idols.
Remember, a lot of the history of European colonialism is a history of Christians traveling to other societies and trying to convince them that their gods were false. Those are the kind of frontier narratives that TOS's writers were familiar with and that shaped what they wrote. Yes, TOS exposed the false gods to replace them with self-reliance, but that's just a secularization of the standard trope, because the point was simply to tell adventure stories rather than to proselytize one way or the other.
And s we've discussed, '60s TV preferred to avoid too much explicit religious content altogether. You couldn't openly advocate atheism, but you were expected to avoid outright preaching and just strike a vague middle ground. Which is why so much TV and movie sci-fi -- even from writers who were religious -- substituted "godlike aliens" for actual gods. Glen A. Larson was a Mormon who created Battlestar Galactica largely as a religious allegory, but he depicted the "Beings of Light" and the Satanic Count Iblis as hyper-advanced aliens, because depicting them as actual angels and demons would've run afoul of network censors. As I've pointed out over and over in this thread, you can't assume that what you see on TV from that era was shaped exclusively by the producers' own beliefs instead of the restrictions imposed on them by broadcast standards. Creating commercial television is very, very much a process of compromise, and it was even more so in those days.