Money is just a made up thing we invented to measure economic value. If a worker is truly valueless, then he gets no money and simply does not participate in the economy. For all the capitalist system is concerned, it's as if he's a starving subsistence farmer in sub-saharian Africa, he's outside the economy and there are no money to be made supplying him with goods and services. The economy does not "collapse" compared to a virtual level where all starving people of Africa are housed, fed, card and amazoned.
Of course you could interpret this as just an extreme form of inequality, where the redundant get some form of food and shelter covering UBI, while the capitalist and the samurai class earn riches beyond comprehension. The system is feudal in the sense that all relative wealth (thus, political power) is concentrated to a small number of people, not that somebody necessarily starves. The serfs could have quite a comfortable life, arguing on HN etc.