The Stargate tech is gained via ancient ruins only and is purely random.
Its the same thing with level 4 buildings, its only via ruins and its with and without missions.
I personally never bother with those traits, i either go with immaterial to remove the need for food or focus it on general research bonuses.
The Trainer keeps it at 10tc, it will still go down, but after a turn, go to one of your colonies and back to the galaxy screen and its back at 10tc.
When it comes to the cheat engine, during the beta, i used to be able to use it to get 100tc and freeze it there, but from a certain version, it just refuses to work, i can locate the value easy, it just refuses to freeze.
I doubt its possible, also, i think the fleet returns could be for upgrades? they tend to do it automatically, which can be both good and bad, depending on the situation.
yeah, i wish they would only patch the game with major stuff.