Pragmatic has high royalties. Folks who do well (trad or self pubbed) either get lucky with the topic or do the heavy lift of marketing themselves.
I created a technical book authoring course [0] a bit back and interviewed over a dozen technical authors. Those who made the most were self pubbed. Though there is a huge draw to get a book with an animal on the cover...