WASHINGTON, July 10 – The White House spent months looking for ways to bypass a federal election agency and use emergency powers to force changes to voting machines, before President Donald Trump ousted its leaders on Thursday, four people familiar with the matter said.