If a ship gets heavily damaged in combat, the game might automatically form an EscortTF, putting the damaged ship(s) & an undamaged DD-type (if available) and setting them to return to the original TF's home port. Survival of these damaged ships is greatly increased by manually switching the EscortTF's speed from Mission to Cruise.
And rerouting them to nearest port, id damage in any are is bigger than 50 (or even at fire)- risk of ship sinking at port (even lvl1) is smaller than on open seas. Good stategy is leave ship at arived port until you are sure that it will take no aditional damage en-route (no fires and stuctural/flood damage more than 60 IIRC - for each category, engines only affect speed of ship ).
Once ship arived at port put it imediatly on pier side repair for faster repairs, you can allways put it back to readines so she can sail again (after 3-days delay), after emergency repairs are done so she can safely sail to bigger port for complete repairs. ¨
And remeber any major damage bigger than 5 can be repaired only at shipyards (less than 5 can be repaired at any port bigger/equal than 7).
This advice, like everything in the game, might be good, might not. If you are in a high enemy air-superiority zone putting that ship at the nearest island, at the pier, might be ensuring you lose it. Everything in this game "depends." You have to make command judgements. If I'm at a very forward area where the "parking" island has no air defense, and I have an xAK with 60 system and 25 float damge, I'm probably taking the chance to send it farther to the rear. If it has those stats plus 30 Fires I'm probably parking it at the nearest island no matter what.
Blanket statements get one in trouble.