So Shatner is justified in treating them like the dirt they are because
Shatner didn't treat them like dirt - he treated them like the supporting characters they were, and the way the majority of those types of characters were treated in 1960ies TV series.
Shatner was the LEAD of the series. He had two co-stars Nimoy and Kelly. The rest were there to support the stories surrounding the main 3 for the majority of the series. Yes, a few of them got an episode here and there where they played a larger role; BUT (even with Scotty as the central plot point in "Wolf In The Fold") - the ultimate story there was how Kirkk, Spock and McCoy SAVED Scotty from execution (and defeated an ageless entity). The leads were there every day 14+ hours a day.
The supporting cast may be there one or two days of a 7 to 10 day shoot.
And Star trek wasn't alone in this paradigm - look at "Voyage to the Bottom of the Sea" or "The Man From Uncle" <--- they too had recurring supporting characters in small roles (and Voyage was probably the most like "Star Trek" in that respect). In Voyage, EVERYTHING centered around Admiral Nelson and Capt. Crane; while in Uncle it was at first all about Napoleon Solo and later became Napoleon Solo and Illya Kuryakin.
Hell, I have to call BS on how much George Takei likes to claim that he "knew Star Trek was quality and was always proud and wanting to be a part of it..." when he (in what I'm sure he felt was a very good for his career move) - to miss a good part of Star Treks second season to go film "The Green Berets" with John Wayne. Hell, he even admits he didn't appreciate that Walter Koenig was hired because he felt they did it to the detriment of his character of Sulu and resent all the screen time Sulu lost (even though a lot of it was because "The Green Berets" shooting schedule ran long and Takei was unavailable so they gave lines written for him to 'Chekov' because hey, one supporting cast member is as good as another).
And tell me - is "The Doomsday Machine" any less popular because Nichelle Nicol's "Uhura" isn't there - bur "Lt. Palmer" is? Oh, and BTW, Nichol's was SUPPOSED to be in the episode - and was contracted at the time; but she informed producers that she had booked a singing engagement that week, and would rather do that; so again, her lines were just given to another character created to fill in her role for that episode - and viewers were free to assume (with a crew of 430) - this incident happened when Uhura was off of her duty shift.
So yeah, spare me that Star Trek" couldn't or wouldn't have achieved what it did without "the four" - and yes, they WERE a part of the overall tapestry; but again, TOS was NEVER an ensemble show; like the other shows of its time it was centered around its Lead (William Shatner) and his Co-Stars (Leonard Nimoy and Deforest Kelly).
And hell, remember that at the start (the first season) - Deforest Kelly's "Dr. McCoy" was NOT seen as a co-lead. That grew out of the fact that Kelly was a great actor and they saw he had chemistry with Nimoy; so they added him into the lead/co-lead's mix. And yes, "the four" plus Shatner and Nimoy stated Kelly got along with everyone because that's how he was; but even he wasn't on set as may days in most episodes than Shatner and Nimoy. Plus at the time Shatner and Nimoy didn't get along that well, because Nimoy began to think he was the REAL lead of the show -- and the producers let that dynamic go on because it wasn't affecting their performances in the actual episodes, plus the ratings weren't that great so it wasn't like they had to put up with it for many more seasons. The only reason it got resolved was for Season 3 Fred Freiberger (who was taking over for GR who had enough and just wanted the money for what he knew was the final season); need to know so there was the famous meeting where GR said "Shatner is the Lead" - which pretty much burst Nimoy's bubble and set the tome for Nimoy's beginning disillusionment with the character and the third season. To Nimoy's credit he jumped into another role that he at first thought gave him a great chance to play many different characters aka the support character role of "Paris" on Mission Impossible immediately after Star trek ended production, but even there he soon got tired of that role and decided not to renew after two seasons on that series.
But yeah, my point? I don't think "the four" were treated any better or worse by William Shatner than any other actor in the same level of role was treated. I think as the years went on, and they found themselves typecast; they began to look back and feel they never 'got their proper due' when seeing how much Paramount was making off Star Trek over the years; and of course because Shatner was the lead; and felt (in a view that was support by BOTH the producers and the writing staff of Star Trek) the series was centered about him; of course if a scene was lagging and the director or line producer asked "hey how do we make it work/make it 'tighter/more to the point' - yes, they might cut some screen time or lines from the support cast members.
So, yeah, I think the 'stories' were embellished a bit over their years at conventions (IE - made more entertaining to an audience) - and as they retell them, they tend to re-enforce their own belief that somehow Shatner was out to wreck their careers personally.
Plus, I'm sorry, but if you're that unhappy, one would think you might mention it to someone in the production team. Hell, Nichols admits she was sleeping with GR for a time DURING the production of Star Trek (and yes, Majel knew) - so you'd think at some point she might bring up a grievance or two.
But no - everything is Shatner's fault because he's just an asshole. (And that's not to say he's a saint, and on occasion might have handle some things in a different way - but it was a lot of stress being the lead of a series in that era of TV production.)