The old workhouses were grim and associated with punishment and stigma, and people were badly treated and miserable.
BUT I do think there is scope for thinking about new models of state-supported housing that would be an option for people in various situations who are currently left to struggle with a benefits system that involves loads of jumping through hoops, form-filling and sanctions, which some people jsut can't cope with. People with mental health issues, people who are recently out of prison and have no option but to beg floor space from the people they knew before, who are still doing drugs etc and so they fall right back into it; the homeless in general; ex-military (who often have MH issues), young people who have run away from home, etc.
Hostel-type buildings with private rooms/bedsits, but also shared communal space with staff and support systems to help people train in skills, apply for jobs, rehabilitate etc. or for some people, they would be a permanent home possibly attached to a workplace like a farm or factory.
There could be hostels for specific purposes eg MH support, ex-military, young mothers and children, or just gender-separated to reduce certain risks.
Of course it would take money to do this properly and also I think the architecture is important - they would need to be positive places not grim and miserable. But the idea would be to save the system money long-term, by reducing offending, and people continually being thrown into expensive, emergency crises by the current housing/welfare system.
The housing system we have now, where most people are expected to somehow have a fully independent and self-contained dwelling, is pricing so many people out and causes social problems - which end up costing more.