Regarding the loss of trade goods, if I trade it away then lose the planet, do I still have the benefit of the trade good or can I get the benefit back by buying the "distribution" back from the civ I traded it to?
You don't lose it when you trade it away.
You lose it when you lose the planet.
The civ you traded it to has it, but can't trade it (they don't own the rights).
The civ who took it from you has it, and can trade it. The rights are tied to the trade good structure.
Since they just invaded you and you're currently at war with them, you have a better chance of taking it back from them than you do of buying it from them.
-
On another note, on the lower difficulties (Normal and below I think, perhaps just those below Normal) there is a lower limit on debt-if memory serves it's -5000BC.