For me, I'd say the anime with the most well-written villains in it has definitely got to be Hunter X Hunter.
Sword of the Stranger
PSYCHOPASS
These two have some of the best villains imo.
The thread "animanga with the best written antagonist/villain?" and its comments have been merged into this thread.
You can view the merged thread's body below:
i don't mean it in a "he's the most evil" way, i mean it in "he's the best written humanized villain ever", for me like johan liebert, griffith, and sousuke aizen are who i deem as well written and smart villains on thr top of my head. well written for me is when they catch you off guard and are unpredictable and smart that you can't help but love the way they execute their plans perfectly, it'd be such a bonus too when they're a foil character to the main protagonist, i would love to hear other people's opinions and eventually get a few recs in to add to my list! thanks!
In my opinion, the Monogatari series has the best cast of antagonists that you can find in anime.
Also, Vinland Saga has a great antagonist that seems to fit what you're looking for. He is a supreme example of being a foil for the protagonist, while also being charismatic.
I'm currently in the process of watching it, but the main antagonist so far in Haikyuu has been a thrill to watch.
Lastly, if you're up for reading novels, the Re:ZERO antagonists become a very good group of antagonists.