GMTA! I foresee a lot of repeat offenders and a growing jail population, especially in bad weather.
Already happening like that, and has been for decades. Jail has been used by homeless as a kind of shelter. The issues are if the homeless is addicted, they will not want to be locked up no matter how good it is. Or, if the homeless is indentured to some 'overlord' of some kind like a pimp or a dealer, then if they disappear for weeks or months they will pay the price when they get out.
But yes, jail is a sanitary, comfortable, stable relief to homeless people most of the time, as you say, especially in winter and a retirement plan in old age. But so what? At least it gets them off the street, so whatever.
The irony today is, in Democrat cities there is NOTHING a homeless can do to actually get arrested and do time even if that is exactly what they want.