For the elevator situation they can be interchanged.
But for other situations trapped = you can not make progress or require to be rescued.
Stuck = you are temporarily held up.
"miners get trapped in a mine when there is a collapse or explosion, and have to wait for rescuers to dig an escape route"
"climbers get stuck on a mountain, when bad weather sets in, and they have to take shelter and wait for the bad weather to pass"