Sure the plan would have worked. Time Travel gets a bit confusing, but you mustn't forget that there is always a first time through. Allow me to try and explain what I mean. I say try because I won't do justice too what is in my head :P
Now, G1 Megatron left a message on the Golden Disk instructing anyone who found the message to go back in time and kill Optimus Prime while Prime (and everyone else on board the Ark) slept. So, BW Megatron found the message and followed orders. He went back in time and, eventually, attempted to kill Optimus Prime.
The argument you're making is that BW Megatron is erasing his own past and thus could never go back in time and kill Prime. But if you use the theory of the 'first time through', then yes, BW Megatron erases himself from history, but the consequences of his actions up until the point that he fires on Prime will stay - IE, Prime being dead.
At the end of the day, it's fiction -- we have to bend the rules of reality a little![]()