Bankruptcy as an exit mechanism for systems with a variable number of components