Ehh... that theory doesn't stand. You're not only combining both endings (which can happen if you do the Genocide route and then a True Pacifist route, but Chara doesn't take over until Frisk and everyone else is out of the Underground, meaning he's patient enough to wait) but Gaster also doesn't really exist, you can only catch glimpses of him and learn about him through what he left behind before his accident that stretched him across time and space in a very painful way. He's the equivalent of a ghost that can't physically harm you because their incorporeal beings. Besides, Gaster would have easily finished the job in killing Frisk considering Sans uses a weapon called the Gasterblasters, which more than likely are Gaster's own weapons.