Been discussed before, and it was realized that this algorithm really hates keeping cities together.
A different approach would be to split line based on equal area, and then rectify the line to county boundaries, based on placing a county on the side of the line which has the most voters. Subsequent regions to split would be selected based on their population.
So for example, if the first split created regions of 3.2 and 1.8 districts, the 3.2 region would be split again. Splitting would continue until 5 regions were created. This would form the starting point for further refinement. Area is neutral with respect to the location of cities, and county boundaries tend to avoid city boundaries, except in metropolitan areas where adherence to county boundaries is difficult.