I’m no expert here and have not thought about this extensively, so I have no strong opinion here. That said, at first glance:
* It seems reasonable that courts need some power to compel people to cooperate with investigations — otherwise they’d be unable to act on certain kinds of crimes, conspiracies, etc.
* What alternate justice system would you suggest specifically, which is presumably more fair and effective that this one?
As for acting on certain kinds of crimes, the job of prosecutors is to gather evidence, and find people willing to testify, to support their case. They already do this, sometimes offering things in exchange for testimony (such as immunity for their part in the crime), to get witnesses to cooperate and offer testimony that can be believed. If they can't get someone to voluntarily testify, however, it seems counterproductive to me to toss them in jail to punish them for not cooperating; from the outside, that to me makes it look like their case isn't very good to begin with.