It was a bad and unfortunate thing that happened. The grate between the elevator and floor should probably be checked out. It looks like, to me, that only one person at a time could fit though that elevator door at a time. . . not one prisoner and a guard on either side of the prisoner. Probably not even one prisoner and one guard could exit at the same time. A guard holding her from behind (at her waist with both hands) could have probably prevented her from falling but how practical is that?
It was just a bad thing.
To me, the practical solution would be to make sure that you never, ever put yourself in a position that you have to wear shackles when you are required to make any court appearance ~ whether it has an elevator with a bad grate or not. (And if you decide to wear stylish high heels ~ do so only at your own risk!) I hate it when I'm this cynical but it just seems so obvious to me.