IMHO you are not losing money to piracy, you are failing to make money due to the inadequacy of the book as a medium for technical data.
I’ve been wondering for several years when the big collapse for some technical books would happen. You don’t have to pirate such books these days to get the information they contain. It’s all over the damn Internet, many times in better ways (“Just clip this code and paste!”). It looks like that collapse is happening now.
The original complaint, however, is like Encyclopedia Brittanica in print wanting Wikipedia to be made illegal.