Basically, if someone trades with you, the civ factory that they trade to you gets counted into your consumer goods requirement:
The game then calculates how many factories you can trade away by subtracting your consumer goods requirement from your total amount of actual civ factories that you have (i.e. actual factories that are physically built in your country, not counting any civs you receive from trade).
And this is the problem - the factories you receive from trade are counted against you in determining how many factories you can trade away, so that if you receive too much trade, it can actually sabotage you.
Here is a simple example, which corresponds to the situation of the USA at the start of the 1936 scenario. You are USA. You have:
1) 128 of your own civs physically in your country.
2) 40 factories from trade to Latin American countries and other countries that like to trade with you.
3) A 70% consumer goods requirement (40% for undisturbed isolation plus 30% for Great Depression).
4) 10 military factories.
The game then calculates your consumer goods requirement counting both the 128 of your own factories and the 40 factories you are getting from trade, as well as your 10 military factories.
So it calculates your consumer goods requirement as (128 + 40 + 10) * .7 = 124.6
It then calculates how many factories you have available for trade by subtracting that 124.6 from your 128 own civs:
128 - 124.6 = 3.4 , rounds to 3. So the game only lets you trade for 3 resources.
Instead, what the game *should* do is not to count the 40 factories you are receiving from trade against you (via the consumer goods requirement) for purposes of calculating how many of your own factories you can trade away. It should instead calculate this:
128 - 124.6 * (128 + 10) / (128 + 40 + 10) = 31.4 , rounds to 31.
So you should be able to trade away 31 factories, but the bug is taking 28 of those away from you, and only letting you trade away 3.
So in general form, the correct formula for how many factories you should be able to trade away is:
owned_civs - consumer_goods_requirement_stock * (owned_civs + mils) / (owned_civs + civs_received_from_trade + mils)