I am responding to the question of terminal illness, not (quite common) elevator claustrophobia. So, you are talking about your recent experience with your granny, right? At a certain time you wondered what you would do in case of terminal illness: face a long suffering or maybe throw yourself off the balcony....

https://en.wikipedia.org/wiki/The_Lift
Sooo bad it's good again (NOT the remake by the same director, that is just bad)