Sounds like hell.
As someone who's been on the diet train for a very long time, weight loss isn't just about caloric deficit. Building a better metabolism through weight training helps people keep the weight off, because you burn off more calories even while you're asleep.
Someone kept in a glorified box would not be exercising. The chances of them regaining the weight would be even higher than normal.
And keeping it off is really where the rubber meets the road. Otherwise, you're just proposing another form of crash dieting.
According to the
National Institutes of Health, "The percentage of individuals who lose weight and successfully maintain the loss has been estimated to be as small as 1 to 3 percent."
These are terrible odds. Not building muscle makes the odds even worse.