You can’t stop it from being mercilessly pirated, and it’s a fool’s errand to try, unless you want to go down the user hostile route much of the ebook industry insists on (vendor specific reading apps/devices serving as DRM).
Bandcamp learned this lesson. GOG learned this lesson. They both provide services users love, without DRM, and just accept that there is no capitalistic scarcity inherent to digital goods like there is to physical ones. An indie ebook publisher would be wise to heed those teachings.
As someone who has sold software online for 20 years, I am very familiar with piracy. It rankles to put a lot of work into something and people just help themself for free. But customer hostile DRM is not great either.
Bandcamp learned this lesson. GOG learned this lesson. They both provide services users love, without DRM, and just accept that there is no capitalistic scarcity inherent to digital goods like there is to physical ones. An indie ebook publisher would be wise to heed those teachings.