I had the unfortunate experience of having all seven of my villagers mine themselves into a deep hole. I was able to build some rough steps up the eight or so blocks needed to access the escape ladder, but it was a bit frustrating.
Here’s my suggestion:
At a certain level, the miner class carries one block of wood at all times to be able to build ladders from inside caves and pits without needing help from above.
To be honest, I don’t think this will be needed - simply because ATM we can’t dig up etc to get out of holes. At the moment of course it’s an issue, but as the mining system develops over time I think we’ll see such issues disappear.
True, this won’t be an issue when things like mining out stairs are implemented. I’m not sure how mining upwards will work or if it can even be done given that we can’t aim the camera upwards. Wooden ladders seem like a quick solution for reaching higher places, though rungs/steps carved into stone would be more functional (and cooler looking!)