I just started reading Station Rage by Diane Carey...
This is basically the episode Empok Nor, but written two years earlier and presented in a different way. I wonder if that episode was crafted based on this? The Memory Alpha articles for both the book and the episode don't mention the connection, which is odd.
The episode certainly wasn't based on the book. The makers of the show were too busy making the show to pay much attention to the books, and if they had
based it on a book, they surely would have credited the original author, otherwise it would've been plagiarism.
It's very, very common for different writers to come up with similar ideas, especially when working on the same series. Plenty of Trek novels have resembled the plots of episodes that came out shortly after -- or even before -- their publication dates. VGR: Seven of Nine
covered the same ground as "Infinite Regress." ENT: Surak's Soul
overlapped elements of "The Seventh," but was published late enough that it could be adjusted to fit that episode. Heck, when I pitched to DS9 that one time, I actually pitched a story similar to "Empok Nor" a year or two before they did that episode. But it never occurred to me that they "stole my idea," because I'm sure I wasn't the only person to come up with that idea. (It's a natural money-saver, visiting a station that's a dead ringer for your standing sets, so I'm sure countless writers came up with variations on it.) And because I'm aware that the number one reason television pitches are rejected is "We're already doing one like that."