“This bill is a massive federal government takeover that would undermine the integrity of our elections,” Mr. McCarthy said in a speech on Friday, in an attack on “this new, Democrat, socialist majority.”