HOUSTON—An energized Democratic electorate wasn’t enough to defeat Texas Sen. Ted Cruz this month, but in the state’s most populous county, it created a blue landslide.

Nearly every Republican in Harris County, home to Houston, was unseated on Nov. 6, including 59 judges and the top executive, Ed Emmett, a moderate who won in 2014 with 83% of the vote.

Mr....