You're looking at this from a storytelling and character standpoint, and that's not really what makes playing a bad guy fun for actors.
Now, I'm not a professional actor but for a long time I wanted to be, and a lot of my childhood taking acting classes both during and outside of school, so I have some insight. The thing that draws actors to bad isn't really the dept of the characters, it's just about playing a character that is about as far from your daily life as possibly get and you get to really just let loose and go places you wouldn't really go playing more heroic characters.
And in some movies it can really let you go more broad and over the top than the heroes tend to be, which can be really fun for actors.
Yes, and I understand that as a generalization. I've seen it up close, because my late father loved hamming it up as over-the-top villains, whether reading stories to my sister and me as children (he did a great Gollum voice for The Hobbit) or doing the occasional performance as part of his work as a prominent local radio announcer (e.g. playing the Devil in a live performance of Igor Stravinsky's The Soldier's Tale).
But my point is that just because something is often the case, that doesn't mean it can't have exceptions. I'm not saying your point is wrong, just that it's not the complete picture. I'm trying to add another layer to the conversation, and that does not falsify or erase the point you're making, it just expands on it. Life is not black-and-white; there are always shades of gray.
And I still say it's possible to write a heroic character who's eccentric or complex enough to let an actor play something very different from themselves. A troubled antihero is an obvious example, though it's low-hanging fruit since it's not that different from a villain. Speaking for myself, as an introvert, I've found that it can be liberating to play the role of a more confident, outgoing figure, whether performing in a classroom or putting myself in such a character's shoes as a writer. (In high school English class, I was just about the only one who performed rather than just dully reciting when the teachers had the students read Shakespeare plays aloud, so I tended to get the big parts like Mercutio, Brutus, and Hamlet.)
Yeah, actors really do have to be careful they don't get to deep into the character. I've been under the impression for a while now that the impact of playing the Joker was part of what lead to Heath Ledger's death.
That's probably just making an excuse for the general toxicity of an industry that puts enormous stresses on its employees, generally through the abusive culture perpetuated by the executives. There's no way a single factor like playing a fictional character would've driven him to that if there hadn't been a lot of other things driving him to that vulnerable state. Since different actors who've played the Joker have reacted to it in very different ways, it doesn't seem logical to assume it's the relevant causative factor here.