In what ways can the judiciary ensure justice for vulnerable survivors in custodial death cases?

I read about the Unnao rape survivor's plea and the Delhi High Court's involvement. I want to explore how courts can protect the rights of survivors, especially when custodial deaths are involved.