Who would ever be okay with their assholery immortalized in someone’s book? If you knew that you might end up roasted in someone’s book in the future, would you act differently toward people? I doubt most people would even care.
Writers can and do exact their “revenge” through their work by creating characters based on the people who have wronged them. Think of all the villains in books you’ve read who have had a series of “unfortunate events” or met an untimely demise; surely a large percentage of them were based on real people for the sole amusement of the author, looking for a subtle way to vent negative emotions. And why not? It doesn’t hurt anyone {provided real names or obvious, identifiable details aren’t used}.
When I first developed an interest in writing, I wrote what’s probably considered “fan-fiction” about my favorite celebrities and singers. You know the usual “plot” ~ in a crowded stadium, the band member or singer you adore somehow sees you in the crowd and instructs the road crew to bring you backstage so you can fall in love and live “happily ever after”. As corny as all that sounds, my stories gave me a temporary escape from life with an alcoholic, abusive father. Writing those stories was a necessary coping mechanism that also made me feel productive and in control of something, if that makes sense.
Would I shame someone in a book acknowledgment? No. For me, that’s reserved for my loved ones who have made a profound difference in my life and not some toxic person whose only contribution to my life was to contaminate it. However, if I ever decide to write a fiction piece, I can’t promise anything.