^Which is a remain from golden age superhero ethics that doesn´t really make much sense. It´s okay that Batman won´t kill for a number of reasons - he won´t go down to Punisher level, making himself judge and executioner, he walks on eggs with the law enforcement as it is, he wants his mission to be about more than revenge, etc. -, but that he´ll always risk his own life to save psycho killers and mass murderers is a bit of a stretch. They also do it in comics so they can keep bringing the villain back, which you don´t need to do in movies.
Plus, as we saw in TDK, the memory cloth cape wasn´t made to carry two people, and it was his only way out of the train, he wasn´t in a position to jump down and use his grappling hook on the tracks, the tracks were collapsing.
Likewise, in TDK his priority, as it is in any hostage situation, was to save the hostage, Gordon´s kid,. and he had to do ir right after being knocked down by a gunshot. Say "he couid have tried this or that" all you want, but it was a highly dangerous situation whatever his action was, you could have a sniper aiming at Harvey from a safe distance and it could still go all wrong and end up with the kid killed. Any hostage situation where the hostage turns out alive and well, especially without a proper police squad involved, is a success, ask any expert.
Of course it´s not your cliché action movie/comic book ending where the hero is knocked/injured and the second later he´s back at top shape and sharpness, but TDK was ALWAYS meant to go beyond being the cliché action movie/comic book movie.