But Republicans, who swept into power in statehouses in recent years, have done much more of it lately, and they have had the benefit of increasingly powerful mapping software to make partisan line-drawing even more precise and effective at protecting their party’s seats.