Simply breed for less swarming.
How do you recognize a less swarm bee? (No, you don't count swarm cells.)
Simple as that: the queen continues to lay eggs although swarm cells are drawn. That is the behavior you looking for. And to select for.
Queens that slow down on egg-laying or even shut down egg laying when swarm cells are drawn, that are the "swarmy bees", with a stubborn and unstoppable will to swarm. Even if you are successful in hindering the swarming, the broodnest is shut down. And this reduces the honey harvest from the current and the next nectar flow. (As does splitting, removing the queen and other rather helpless methods of "swarm prevention"...)
The broodnest is the honey pump. Not only it is the passover and takeover place for incoming nectar, 25 % of the food the food glands of young nurses go into feeding foragers. With less young bees and nurses present, the forage force runs out of quality fuel.
The functioning broodnest is actually most important to make honey. Course you can play here and there, removing the broodnest at the end of a flow, shuffling frames, placing empty combs in between. But all that fiddling costs a lot of unnecessary labour. It is unnecessary and less successful than a good functioning broodnest.
Of course all bees want to swarm. But there are huge differences on HOW bees swarm. The one will shut down the broodnest. Others don't. While removing swarm cells helps a lot in bees with a low swarming tendency, it is useless in swarmy bees. The only cure for swarmy bees is to remove the old queen. Which is as bad as swarming, because in either case the broodnest is shut.
So breed for less swarm willing bees. Harvest more honey, have much less trouble beekeeping. It is easy to select for, simply watch the queens behavior.