Here in Texas, the election of all judges except municipal judges is lamented because of just what you point out: their vulnerability to fianancial enticement by campaign donors and the influence upon their opinions by those donors. In fact, in the textbook I use for class it has a section that asks Is Justice for Sale in Texas?
In Fla in 2012 there was a concerted effort to unseat two State Supreme Court Justices. I believe Koch money was involved. Fortunately it did not work. I have a good friend who is a circuit Court judge, running unopposed for re-election. He was advised to raise 100K just to scare off opposition. It is a crazy way to select judges.