Here is how tech works:
The production phase is at the start of the turn. In it, you may do actions in any order you like. This means you may repair a facility, finish a tech, and then build that tech, all in the same turn. There is no “cooldown” turn for tech. Once you have it you have it.
References:
7.6 “If you repair a damaged factory, you get the technology die roll in the same turn.”
Secondly, you roll as die to advance to the next stage, it only takes 4 rolls to get a tech. Once your roundel is on “complete” you have completed the tech.
References:
7.7 “Rolling the indicated value of higher on a d12 results in success and the player places a roundel on that stage of development to show that the stage is complete.”
Major factories are not tied to a specific tech. They just grant one tech roll. This is nowhere even hinted at in the rules. Tech rolls may be used for any tech, with the only criteria that a) a tech may be only rolled for once a turn, and b) you can’t move techs past stage 2 before Jul 39.(section 7.6) You may change up your research as much as you like to suit the changing war. There is no sunk cost.
Thus, as Germany, you start with 4 tech rolls in Jul 36. You roll one dice for wartime income, heavy armor, advanced mechs, and long range aircraft. You hit wartime income and heavy armor. You place a roundel on stage one of each.
Next turn you have upgraded the Med. Factory, and you get 5 rolls. You roll of the above, along with advanced artillery. You hit wartime income and long range aircraft. You move your roundel to stage 2 of wartime income, and stage one of long range aircraft.
Next Turn in Jul 37, you roll for the above, but instead of advanced artillery and wartime income, you roll improved construction and improved factories.
This continues till Jul 39. You have 7 techs currently sitting at stage two. You roll for five of them, and hit wartime income, advanced mechs, and long range aircraft. You move the roundels on those techs to stage 3.
In Jan 40,with good luck you roll and hit long range aircraft and advanced mechs again! You move your roundel to the last box: “completed.” As of this point, you now have long range aircraft and advanced mechs. This turn your planes get the bonus. This turn you may build advanced mechs.
I hope that makes sense.
You may house rule as you like, but this is the official rules.