Police are civilians and should be treated as such, it shouldn't be any more legal for them to do something any other civilian would face substantial legal penalties for without facing the same penalties.
Also, we could make laws saying that prisoners are only allowed to be kept at approved prisons; a law that could be applied equally to police and citizens, while ensuring the government gets to approve who gets imprisoned.
What they lack is qualified immunity, so it's pretty rare because the risk of being wrong is too great. Which seems to be a valuable take away.