I remember that episode. I also remember a comic book about nearly the same, except the man with the shelter closed it up, with a time lock and no one could break in or out for several months!
Then he remembered he had forgotten a can opener and had no way to get to his stored food.