These numbers are possible and repeatable. I've made over $100k on software books at least 7 separate times [1].
If you're going to try to do this, the key idea is to build an audience e.g. an email list. You need to budget 50% of your time to writing the book and 50% of your time to blogging/promoting the content.
There's basically three key aspects to making $100k on a programming book:
1. Market - is the topic broad enough to sell $100k in copies?
Weak market: Build an Adblocker with Clojure on Arduino
Strong market: Complete Guide to D3
2. Offering + guarantee - what does the student get when they buy?
Weak offering: my 200-page pdf
Strong offering: my 400+page pdf/epub/mobi, 2 hours of video intro, invite to community chat, interviews with experts, support, questions answered by the author, quizzes, and worksheets
3. Promotion Effort
Weak promotion: posting 3 times to medium
Strong promotion: writing remarkable content, posting weekly, creating downloadable resources, collecting emails - launching to an email list of 10k-100k+
When you hear someone say, "you can't make money in programming books" run their strategy through the filter above. It's no wonder most folks don't make much money, because doing it right is hard.
It can take months to build an email list of 10k, but that's how the game works.
[shameless self plug]
If you're thinking about creating a programming book or a course, this is what I do and I'd love to chat. See here: https://www.newline.co/write-with-us
[1] https://news.ycombinator.com/item?id=17015117