A note on gifting resources to players: in the game I am in currently, my teammate and I discovered a very simple way to manage this - of a sort, anyway. Simply have your engineers assist-built whatever it is of your partners that you need made faster or that they don't have the resources for. My partner was easily able to "gift" me the 100K metal and crystal I needed for a Tech II Leech starship just by having a fleet of his engineers assist my starship constructor while it was in progress.
There are actually a lot of subtle ways for partners to back each other up like this that we've been having to learn (we started nowhere close to adjacent to each other thanks to hidden galaxy map); remember that things like Science Labs and power plants can be gifted, and the "power plant interference" mechanic only applies to power plants owned by the same player - so each player can have a Mark II plant on each planet with no interference, if they can afford the resource consumption. Also remember that Mobile Builders can build things in your ally's planets.
As far as actually gifting resources from player to player, I would be tempted to make it strategic instead of automatic. Something along the lines of Red Alert 2's implementation: Have there be a "Cargo Truck" unit that costs 5000 or 10000 of one resource to build but builds really fast, and give a script of "on death, give 5000/10000 of that resource to the player who owns the current system". That way there is the potential to lose resources you are trying to trade if the AI takes them out.
Sorry for sidetracking the thread, just didn't know where else to put this.