Writing a Good Bad Guy in Books (In Fact any media) is the “classic choice” sometimes they are really poorly made, and don’t work. Other times, they are loved so much that when the character was only added to kill the hero, they end up becoming an Icon
I really liked the villain in a book called “Little Fuzzy”. It’s public domain, here’s a link:
https://www.gutenberg.org/ebooks/18137
The gag is this… A habitable, but uninhabited planet has been discovered. A corporation has been granted infinite rights to the planet and has set up colonies, mining operations, terraforming operations, the works. It’s been running well for 30-40 years and people are making money, notably the CEO Victor Grego.
One day, one of the miners finds a little fuzzy bi-ped in his camp, nobody has seen an animal like this before, and he treats it like you or I would a lost cat turning up at our door.
The more time he spends with it, the more he thinks the creature is intelligent, and maybe more than intelligent, maybe sapient. Which would mean the planet is inhabited after all.
When the corporate charter is for an UNINHABITED planet. As videos start bouncing around and scientists and psychologists start getting involved, the CEO becomes worried that he could lose EVERYTHING, and pulls out all the stops with his cronies to shut “this nonsense” down, including, at one point, offering a bounty on little fuzzy pelts.
At the end, it all hinges on a legal trial, are fuzzies sapient or not?
It’s a good, short read. You can knock it out in about 2 hours. Highly, highly suggest it.
Bonus - There were two more that AREN’T in the public domain. :(