To get the 'Sonic made a good future in Act X' ending, you need to find and destroy a machine in the past. It's just a wreck in the present, so you can't destroy it then.
It's hard to explain what it looks like - you'll know it when you see it (destroying it also destroys all enemies in...