Alternatively, the repair crew don't stay on the ship. Have a mobile team on a faster boat going ship to ship rescuing and repairing ones that can't make it to port again.
Part of me starts to wonder now about building boats that are more resilient, but then I remember that salt water is terrible and surely by now someone would have if it were possible, since we spend so much money on humans doing that maintenance!