I would say that if we're going to speak of agency, and there are outcomes that are unwanted, then why arrange the situation to put the players in the exact situation that you don't want?
I don't think that anyone is objecting to negative consequences for player choices, I think it's more about the players being painted into a situation with increasingly narrow choices, and then acting as if they did something wrong.
So go back to the party when the NPC is found dead, and they are accused of the crime. They can surrender... or what? Commence the slaughtering then? The players opted for the peaceful choice. But they just as easily could have tried to fight their way free. If that outcome is no wanted, then making it possible seems like a misstep on the DM's part, no?
Go back to the jail cell. They can sit and wait for the judge, who they've been told won't be available for some time. The mention of that implies to me that they're meant to do something beforehand, otherwise, why mention it? It has the feeling of a deadline, the way it's presented. So they try to escape. They fail, and remain trapped in the cell. Not really much choice here.
Go back to the mysterious stranger showing up in the jail and offering them an escape at a cost... they accept. They then have to sneak out of the jail. What are the possible outcomes here? They escape and go do the stranger's quest, or they fail to escape and... what?
If they get caught by the guards, what do you think is going to happen? They agree to go back to their cell and await the countdown to the judge? The more time in that cell, the more the game feels like it's spinning its wheels. So they decide to take action... and as is often the case in D&D, that means fighting.
If this result is not wanted (and by not wanted, I'm going off of the DM's desires here) then why arrange for it to be possible? They've been slowly pushed into this situation with very little choice about it. Deciding to fight their way out is the only active choice they had. Everything else is things hapenning to them... they're passive participants in the events. Finally, they chose to act. And now they need to be punished for it?
That's absurd.
The problem is in viewing this as if everything that happened was the choice of the players, and so the consequences are all on them. Clearly, a lot of what happened... most, I'd say... was because of the DM's choices... so it's at least as much on the DM as the players. I expect, based on the surprise of the original DM, that going on a slaughtering spree was unlikely for this group of players, and that they only did so out of frustration and confusion about what they were "supposed" to do.
To insist that the players are fully responsible and so the consequences need to be as severe as possible is mistaken. The DM created this situation, and if it's unsatisfactory to them, then they need to own that.