We were warned by at least one of the Founders that our constitutional republic could not survive a people of poor character. As for the problem of a rogue (activist)judiciary, the only thing I can think of would be term limits for all judges.
And they were right.