I'm sure this was a huge part of the lesson... they were never in any danger of actually being trapped in the cave for 19 days or however long it was.
Right. Yoda admitted that he lied about that. They weren't in danger of being trapped by the ice wall. No, they were simply in danger of falling off cliffs or getting buried in avalanches or drowning in freezing water. Muuuuuch
better all around.