I think it would lead to worse outcomes, and is likely to end up based more on whether people like the person accused, or like their results than on what they actually did.
Social shame is a tricky mechanism.
That said, what the culprits do is really very shameful and professional organizations used to treat shameful behavior of their members in this way, rather than handing them over to standard public courts.
At the very least, if other scientists are publicly involved, the public gets an impression that the community doesn't "wash its collective hands" over its own bad actors and tries to remedy the problem actively.
Maybe both should be combined. "A trial by your peers" would be trial by a non-judicial panel made of other scientists (who are the real peers of the culprit), and it could only mete our punishments of specific and relevant type: research bans, public apologies etc.
I certainly don't think that people should be jailed for scientific misconduct. Prisons are useful in isolating dangerous people from the rest of the society, but their restorative effect is minuscule even in Europe, much less in the USA. And fraudulent scientists don't have to be isolated from society, unlike rapists or muggers. They just have to lose their credibility.
I see your point about wanting to reserve prison for strictly violent offenses, but there is such a thing as serious yet non-violent crime, which is the entire reason why low-security prison is there.
Scientists, even dishonest ones, are very highly educated people with important and hard to replace skills. Locking those skills away is a huge loss, much higher than when you lock up a run-of-the-mill Ponzi schemer.
I would prefer some punishment that would still make use of their talent and skills to benefit humanity. Perhaps they should be required to design better research methods that prevent their own sort of fraud etc.