(chuckle) Wouldn't that be lovely! (And it's kind of you to be thinking that way.)
But alas, that's not how it works.
When you're working in/for other licensed universes—which is always on a work-for-hire basis—the only really significant payment(s) you're likely to see will happen when you've turned in a given book and it's been formally accepted. And even then, the payment's rarely going to be higher than low-to-mid five figures... which (after your literary agent gets their cut, and after your taxes on the income get paid) won't take you very far even in a single year, let alone the years that follow.
If you're very lucky in your publisher, or have a very good agent—which I do—you may even manage to get some royalties on such a novel. But they'll be at the low end of the scale—maybe 2-3% of the cover price. (Bearing in mind that even for original novels in one's own universe, an author rarely gets more than 8-10% of a given book's cover price in royalties.) And when the book goes out of print, the royalties stop.
So just because the owner of the IP makes a lot of money off it, doesn't mean that any significant amount of it necessarily trickles down to the writer. (sigh) Nor does the fact that a book is good, or the writer is good, or both, make any significant difference to this kind of mathematics. Eventually, pretty much inevitably, sooner or later sales of a book drop off and the publisher lets it go out of print.
(shrug) It's not like I didn't know this was eventually going to happen when I wrote my Star Trek work. I did that because I loved Trek (and still do), and I was sure I could write a better Trek novel than anyone else had up until that point. (And maybe that was even true. Who knows.) To have done the work was the thing that primarily mattered.
But let this be a reminder to folks that only a low percentage of writers make enough from their writing alone to live on: and that something like 90% of writers live at or near the poverty line and sometimes slip below it. ...And for all of us, even for strong writers who seem moderately successful and have other income streams, bare patches happen: times when publishers don't pay (for example, I still haven't been paid anything for Disney/Marvel's reissue of my Spider-Man books), times when you can't work, or times when accident or illness or other unexpected circumstance eats the cash you've stashed away to serve as a cushion.
This is not a safe lifestyle. With talent and luck and endless slogging away at/over the writing mechanism of your choice, and with the support of your readers (who I'm very much thinking of at the moment!—and thanks again to the Ebooks Direct customers and Ko-Fi friends who just now saved our butts), it can be survived. Which, from day to day, @petermorwood and I do our best to keep on doing.
...In any case: people who even at this end of time can say things such as you did at the top of this, make me feel like about a million dollars. 🙂 (And since I have both an upper respiratory infection and laryngitis today, that's quite a trick!) ...So thanks.