Disclaimer: not a transportation attorney, but I did teach torts and criminal law for many years. Indemnity is against public policy for criminal negligence, but not for tortious negligence. The difference between those kinds of negligence is that criminal negligence requires a gross deviation from appropriate standards of care, whereas tortious negligence is made out if any deviation from appropriate standards of care is proven. Also, criminal negligence needs to be proven beyond a reasonable doubt, a higher proof standard than tortious negligence.While the freight railroads do have indemnity, if they are found to be recklessly negligent that may reopen them to damages. Unsure how that all works but if found to be negligent that can change things. It does sound like the dogma of PSR was a major cause of this accident.
That said, unless there are deaths or a lot of serious injuries, and where the safety dereliction is easy to prove, I don't think criminal charges would be likely. Indemnification is one of those little-appreciated outrages in our legal system. For example, in a lot of nursing home contracts, the patient agrees that if the nursing home is found to be negligent and causes injury or death to them, the patient agrees to indemnify the nursing home for any damages assessed. But people entering nursing homes aren't in any position but to sign take-it-or-leave-it agreements drafted by the nursing home, however unfair. I think it equally unfair that the railroads have forced taxpayers, via Amtrak, to shoulder the costs resulting from the railroads' own lax adherence to safety standards and even outright flouting of them.