Chara died so Asriel could absorb their soul and when the humans fought back, Asriel would attack. But Chara's plan failed because Asriel didn't fight back and ran away back home. Asriel died and then Asgore would kill 7 humans and get their souls to break the barrier. When they did that, they would attempt to end humanity and slaughter every human. That was Chara's plan. When Frisk falls into the underground, they are being controlled by Chara, (Aka YOU) and does a Genocide route. Similar to Deltarune, Kris is controlled by the Player, and then Kris rips them out at the end of the game so you can't control them. In Undertale, Chara (You), control Frisk and slaughter every monster. Undyne and Mettaton both realize that you'll do the same thing to humanity. So yes, Chara was genocidal from the beginning.