Also, I'm pretty sure I've said this before, but I'll say it again:

Part of your job as a senior is to tell your juniors about your fuckups. The embarrassing cringe reckless and lazy bullshit that you did when you were new, and the various times you brought down Prod. We ALL did it sometime. And then tell them: the moment you realized you fucked up, I know, the impulse is to try and cover it up, but don't do it. Come to the seniors you trust, and they'll help you unfuck it, and fight management tooth and claw like mamma and pappa bears to defend you from any shitheads in management. Because that's what our seniors did to us.

@JessTheUnstill This is exactly my experience, when I was not yet senior - I fucked up majorly a few times, and was given protection and room to fix it myself and learn from it. I at least *try* to do the same now on the other end. Not sure how well I do, but I make it a point to often say "fuckups are normal, don't worry, stay calm, no one is going to die, everything can be fixed."