As the author of 5 tech books (all available in ebook format and published by O'Reilly Media), I can tell you that the O'Reilly party line is essentially that "DRM logic is flawed". We're in a transition period right now and you have to have "faith in the base logic market" and take into account how "DRM interferes with the user experience".
My personal views on the matter as a producer of published goods and as someone who is trying to treat my latest effort as a "book-as-a-startup" (product vs project) are basically in line with those of O'Reilly in that you don't lose anything with digital goods sales unless more people who could have paid for your content don't pay for it because they elected to stick with the pirated versions. e.g. "People who don't pay you generally wouldn't have paid you anyway."
In some regards, you could actually look at it as a sign of viability and even a compliment if you were a highly pirated ebook author. Clearly, you've done something right to have become that "in demand".
Anecdotally, and along related lines, I've had many people tell me that they often will "preview" content by searching for a PDF and then following up with a purchase. In that regard, pirated versions may ironically lead to "conversions in sales" for the people who would have paid you anyway.
Along related lines, many ebooks these days are inexpensive enough that it's just not worth the trouble to risk having an out of date pirated version when publishers like O'Reilly now offer premium services such as giving you automatic updates to Dropbox or Google Drive. In that regard, people who "would have paid you" probably will pay you for that premium of having the latest/greatest errata-free versions (at least for tech books.)
A closing thought: I suspect that there is a strong correlation between how pirated your content is and how many copies that you actually sell. (The sum of the two could be considered your "overall demand".)