Do you know if factors like Pop affect trade route payouts. or is it just the modifiers of the capital/trading post that matter.
One of the XML files is called TradeRouteDef. If I'm reading that file correctly, a standard or slave trade route should have a base value of
0.05 * [planet "incomes"] + max(1, min(250, 0.025 * [trade route length])) + max(1, min(250, 0.1 * [trade route age]))
A luxury trade route should have a base value of
0.1 * [planet "incomes"] + max(1, min(250, 0.05 * [trade route length])) + max(1, min(250, 0.1 * [trade route age]))
Luxury trade routes should additionally grant +5% influence and morale to the host colony, while slave trade routes should grant +5% production to the host colony. All three types of trade routes should grant +1 morale to the colony if at least one of the empires involved has the Entrepreneur faction trait. This base value is then multiplied by the trade route value bonuses which apply to the planet in question.
It should be noted that the "planet income" modifier listed in TradeRouteDef.XML appears to be based off of planetary production rather than any specific to planetary income. I have a (somewhat modded, but nothing specifically aimed at trade routes) test game where Earth is specialized for manufacturing and has a population of 61.4 (production of ~109) with -39.5 income while another world is specialized for wealth and has population of 27.5 (production of 61.9) with 2070.8 net income, while Drengi (my trading partner) has a population of 17 (production of 22) and a net income of 11.3. The Earth-Drengi route 6.6 of its base value from the incomes of Earth and Drengi according to the tool tip for the trade route in the Govern screen, while the other colony's trade route gets 4.2 of its base value from the incomes of my other colony and Drengi (again according to the tool tip). 5% of 2070 is 103.5, so clearly net income is not used to compute the bonus from trade planet "incomes," but 5% of 83.9 (22 production from Drengi + 61.9 production from my colony) is 4.195, which is rather similar to the value of 4.2 listed for that trade route's bonus from trade planet "incomes." Similarly, when we check Earth-Drengi, we see that 0.05 * (109 + 22) = 6.55 and that the Earth-Drengi trade route has a bonus of 6.6 from trade planet "income." Note that if you have structures (or projects, if you've modded the existing projects or added new ones) giving bonuses to gross income (e.g. v1.01 Prometheon Pleasure Parks), this bonus will NOT affect the trade route value.
This indicates that the best trade worlds are high population worlds, preferably with bonuses to base production (high approval, stacked Economic Rings, Durantium Refineries, Thalan Hives, perhaps a few other things; note that despite v1.02's renaming of the tool-tip to indicate that the Durantium Refinery and probably everything else that gave production bonuses give bonuses to "total manufacturing," the structures themselves still give their bonus to a planet's base production before any modifiers) and trade route value multipliers.
This also indicates that trade on smaller maps tends towards pointless; smaller maps cannot accommodate long trade routes, and tend to be relatively short, which imposes several constraints on the two main contributors to a trade route's value. It just isn't feasible to make up for significantly shorter trade route lengths by way of population, not when only 5% of the planetary production goes towards the trade route value and planetary production values tend to be in the low hundreds at most anyways.
as it is now, i usually send my trade ships from my trade capital to alien planets that are far away.
This would appear to me to be a very good rule of thumb, though I'd also tend to prefer higher-population worlds if they're similarly distant.