Staff teams such that deadlines are met in advance, leaving plenty of time for training, team building, and code cleanup/future planning.
Offer better insurance and RSUs.
Increase pay when needed, rather than letting employees be snatched away and ending up paying more than what they deserved in onboarding costs.