STAR TREK lost money for Desilu and Paramount during it's first run on NBC. But afterward, despite having only 79 episodes when 100 was the usual minimum, the show made money for Paramount in syndication.
William Shatner owned five percent of the show, but he went flat broke shortly after it was canceled. This was due to a ruinous California divorce: he owed alimony based on his weekly STAR TREK salary-- and the series was canceled. And on top of that, his ex-wife got half of his piece of STAR TREK's afterlife. So even after the syndication money finally got rolling, he was getting a little and owing a lot. STAR TREK actually hurt him financially until TMP got made.
The Roddenberrys struggled to stay "rich" in the 1970s, in part due to high lifestyle expenses, and also because his pilot movies hadn't gotten a new TV series started. Gene has said that he was broke by the time ST-TMP got rolling.
Bjo Trimble helped Roddenberry organize the letter-writing campaigns that staved off cancellation twice, after the first and second seasons. She later wrote the STAR TREK CONCORDANCE (a great book in its day), but lost her royalties nest-egg to a dishonest accountant or some such, and she and her husband were broke or close to it in the mid-1990s, I read. Although she appeared as an extra in TMP, it obviously didn't do for her what it did for Roddenberry and Shatner.
I wonder if any other TOS alums went broke after the show got canceled.