The legal bid, which Trump has said he ordered personally, sparked alarm, given concerns that Republicans will seek to contest losses in the midterms battle for control of Congress.