Thing is, that's exactly how you do it as a capitalist.
Compartmentalise your businesses and ensure they're registered so as to never come after your personal assets should they go bust.
Then, if the business fails and goes bust, shut it down, sack everyone, and a week later reopen in the same place with a slightly different name and rehire most of the same staff under the new company.
The new company is not in any way legally connected to the old one, and the one one's debts are to be handled whatever administration firm took all that over, etc.
I've seen it happen first hand here in the UK, good example of why capitalists are scumbags that are above our laws.
Because how else am I going to get those deep creases out of my blouses!