System is NOT working. There are too many such crimes, not just in UP and elsewhere as well. If people cannot be safe with police that means checks and balances have eroded. Custodial deaths, police station rapes and other crimes involving police / law enforcement have been reported within past weeks IM TN, and two other states.
Some special action is required by Amit Shah the home minister that will apply across all states *even though police is a state subject.
Since you have already identified that policing is a State Subject, there is nothing Modi or Amit shah can do besides setting up Institutions that will help police do their jobs better.
Crime and Criminal Tracking Network System (CCTNS) is a great initiative by the govt. to consolidate criminal data and tracking them real time.
So was setting up National Forensic Sciences University.
The very fact that we had a Child helpline working with the police and who automatically got involved as standard operating procedure for China abuse case shows that the system works.
Custodial deaths happen because of compromised Judiciary. Modi tried to set this right by introducing the National Judicial Appointments Commission (NJAC).
But the SC struck it down because it wants to safe guard its own interest.
Like most Indians you are confusing Judicial reforms for police reforms.