I have heard from random lawyers that if the facts are in your favor, get a bench trial, if you are actually guilty, you can maybe sway a jury.
We don't have juries because they are smarter or more fair or more just on average than a judge. We have juries entirely due to the concept of jury nullification. It's a formalization of the concept the founders sometimes expressed where "Yes I did it, but that doesn't mean I should go to jail" is an intended outcome. It's explicitly that Justice isn't the same as "follow the letter of the law".