Possibly. Although I think there is a larger and easier to justify separation of morality when you are sitting by yourself at a computer doing "evil things" and when you have three to six other people sitting across from you in a room and you do them. And in addition, I think it is also much easier to keep yourself at arm's length from what you do when you are just playing the bits the video game designers programmed into the system for you to do, than it is when you have to invent and then verbally describe the gruesome actions you are taking-- especially when your descriptions have a much wider range and level of detail available.That's kinda what this thread is about: What would a better implemented Necromancer wizard subclass look like?
I'm not entirely sure that this assumption squares with the necromancer's relative popularity in a wide breath of video games where they exist as heroic or protagonistic characters: e.g., Diablo 2-4, Guild Wars 1-2, Elder Scrolls Online, Path of Exile, etc. I have seen a fair number of players express interest in the Necromancer over the past 20 some years. However, many were kind of underwhelmed by it in D&D, especially when compared to some of the aforementioned video games. My own bias leans more towards a gap between the D&D Necro and the Pop Culture Necro rather than it being perceived as a villain option. (Though maybe this is also generational.)
When a Death Knight in World of Warcraft summons a zombie, an animation just pops up of a generic zombie sprite climbing out of the ground and then runs off. When you animate the dead in D&D... the players and/or Dungeon Master can and probably will do into more graphical detail about just what happens to the corpse of the flayed townsperson lying at your feet and gets raised as a zombie... in addition to describing the reactions of the other horrified townspeople who witness it.
Now how big of an issue that actually is, I have no idea. But I do definitely believe that verbal inventiveness and narration of evil action from someone sitting across from you has a more visceral feel for a lot of people than just seeing sprites on a screen do it, and thus doing these actions in tabletop is quite possibly more objectionable than doing them in video games-- especially if playing with a DM who would actually take the morality of taking control of a person's corpse for personal gain into account. So it could be an explanation why the Necromancer in D&D is not seen the same way as a Necromancer in Diablo 4.