It’s tough. Look at Amazon. They cull the bottom 5% every year. It has a negative affect on morale because everyone is continuously on edge and having a bad month or two can be dangerous. Look at a layoff, it craters morale and reduces productivity.
The best bet seems to be to grow slow, hire and retain the best, and fire the low performers only as needed.
After that, look at corporate giants like IBM. They are laying off, yes, but historically they just lurched along, providing a paycheck to everyone.