There have been lots of related exploits like this in various 4X games. Ultimately, you should not be allowed to include continuous items (research treaties, resources, credits-per-turn, etc.) and one-time trades (techs, money, ships, planets, etc.) in the same deal.
actually you could it just needs some work
primarily what would be needed is a turn requirement and a penalty for breaking the turn requirement
for example lets say the drengin want to buy a colony ship from the toriens (canned food).
they could buy it outright for 250 credits or pay 5 credits per turn for at least 50 turns (or some other combination that adds up to 250)
now after 1 turn the drengin go "you know what nah we got our colony ship why bother paying were breaking the deal." at this point the U.P. should step in and say well you need to pay off at least 75% of the remaining amount owing (184 credits) if you do not have that much in your treasury you need to sell an amount of assets in order to pay off the remaining amount.
further the toriens are now upset with you for breaking the deal and will ask for more in trades from now on. if you do this too often the other players will learn and start distrusting you in deals.
there should also be a way to buy out a long term deal
using the previous example
after 10 turns the drengin want out of the deal they still owe 200 credits across 40 turns so they talk to the toriens and say hey we will pay you 170 credits (85%) now if your willing to cancel the trade. The standing between the races will determine if the toriens are willing to take the deal or reject it. in this case there would be no standing penelty for accepting or rejecting the deal
also declaring war should break the deal without the 75% penalty but have some a serious lash-back from the U.P.