Is there any way to set "if cargo holds full, unload everything at Earth" as a conditional order? It's getting a bit annoying having to micromanage my salvage fleet (which I'm just using to haul cargo right now because I've finally finished cleaning up after my last war) to avoid losing ship components (which I want to break down for resources).
A few other questions on foreign components:
1. Can you use them in a design of your own? I've captured a ton of foreign ships after conquering AI homeworlds, and I'd like to make some small upgrades cheaply. For example, I'd like to rip the missile tubes out of a captured missile ship (the AI used size 4 missiles instead of the size 5 I use for light missiles), as the ship is servicable as a second-line combatant despite being slow. Eventually I'd replace everything with my components, but I'd like to get it usable cheaply.
2. In the event that a ship takes damage in combat, does having the components on hand reduce repair time?
Components do not facilitate combat repair. What you want is maintence storage for replacement parts, damage control for repair speeds, and Engineering spaces for a little bit of both with subtracted incident failure rate unlike the afformentioned both.
Putting parts in your ships that weren't already in require a complete refit. The less that changes between refits the less expensive it is to carry out. The worst offender is tonnage, or anything else that affects the hull, such as changes to hull technology, thickness, or tonnage (affected by even the smallest internal tonnage change). Refiting for hull can be more expensive than building a new ship altogether, so what you want to do is use Copy Design on a refit candidate, and make sure you do not change armor thickness, do not click "New Armor", and make sure that the final tonnage is the same as before. Otherwise, as a rule of thumb, try to keep the internals as similar as possible to the old design. For instance, when using new engine tech, you can upgrade by making the new engine exactly the same size as the old one. There will still be refit costs, but following a model like that it will be significantly less.
Refitting is also useful for conserving Task Force training of a vessel, if it is important.