So the takeaways, as I undertand them, are:
1. Culture is (usually) a better investment than either refineries or TPs.
2. If we price resources at their "buy" price--because we're cash rich/reource poor--refineries (usually) beat trading posts. If we price at the "sell" price--because resource rich--TPs are (usually) better. So build refineries if/when that will get you from cash rich to neutral. Build TPs if needed to get from resource rich to neutral. Note that, because in this case we price resources at the "sell" price we do not follow RA's calculation in the OP. The TP costs 1256.25 and pays back in ~10.5 minutes.
3. If/when resource neutral, build refs and TPs in balance w/each other--or not at all to save slots for labs.
4. None of the above calculations, nor RA's, include the cost of the enabling tech, so the real payoffs are slower in all cases.
5. Value of resource enhancing techs depends on empire size and on whether you are short or rich in that resource. In my (limited) experience, for about 6 planets one 7% bump is worth 0.2-0.3/second. Take the example of the first Advent ore tech (level 2): 600+50+100.
If ore poor, ore=4.5, crystal=2.25. Cost = 600+225+225 = 1050. Return = 0.9 (~20 mins) to 1.35 (~13 mins). Not great. If ore rich, cost = 600 + 112 + 450 = 1172. Return = 0.45 (~43 mins) to 0.67 (~28 mins).
Should you ever improve your rich resource? Best case is ore for TEC. 1st level tech costs 512, returns 0.45 (~21 mins) to 0.67 (~14 mins). So not quite never.
6. Should one prefer resource tech or refieneries? Whether to improve your poor resource depends on empire size, how good is your best refinery opportunity (if not Advent), and how many refs you would build. Best case for refs, you are TEC and poor in both resources. Refineries cost 2800 (tech) + 2850 each. So 3 are way more efficient than 2 or 1. Let's say 3 refineries x 8 extractors = 2.4/second (worth 10.8) vs total cost of 11250. Pays off in 1040 seconds ~ 17 minutes. But it is much worse if building 3 refs tips you over into being rich in one resource--in which case you probably don;t build all three.
If resource tech will produce 0.3/second/level, then level 1 and 2 resource techs--for the poor resource only--will almost always be a better bet than refineries, as well as saving slots. Even level 3 and 4 could be better than refs barring a map especially favorable for refs.