The amount of production of a great engineer on normal speed is calculated using the formula
300 + 30 * city population
So in a city with a population of 1 the engineer only results in 330 production, in a size 15 it results in 750 production.
For quick speed the formula is:
200 + 20 * city population
For epic speed it is:
450 + 45 * city population
and for marathon it is:
900 + 90 * city population
The amount of hammers does not seem to be influenced by era, map size or difficulty level.
Conclusion:
If you want to hurry late game wonders, build it in a city with a large population.
I've been thinking about it myself, and I agree that it's almost always a better option to let the city stay as a puppet for a while before annexing it.
One major drawback here is not only that you cannot control what puppets produce, but it's that puppets never produce units. If you're at war, for example, the ability to produce units is critical, and sometimes you just need the extra city right now. Still, considering that conquered cities lose half their population and most of their buildings, their production is usually so low that making them a puppet is probably still the best choice.
Regarding the edit: I see no reason for annexing a city before the riots are done. You can't do anything during riots anyway, so it's best to not lose the extra happiness for these few turns.
However, now WillfulWizard's answer becomes more important. If you intend to annex it soon but you want to keep it a puppet for just 2 to 5 turns, there's a good chance you might forget - particularly if you're in the middle of a war and every turn is hectic and eventful. If you intend to annex it quickly anyway, maybe it's best to just lose the few points of happiness from having the city annexed during its riots, than to forget about it completely.
Best Answer
A few options:
Note: if it's particularly the courthouse which is giving you trouble, consider getting the Police State social policy, under the Autocracy tree, which makes occupied cities produce only half the unhappiness value.