WASHINGTON—Over his nearly three years in office, lawyers representing President Trump have made numerous legal arguments that, taken as a whole, would give the president sweeping immunity—even if he were to commit murder.

An extensive review of correspondence, court documents, legal opinions and public statements from lawyers representing Mr. Trump shows the president’s attorneys have consistently pushed to put him beyond the reach of any other institution in federal, state or local government—immune to civil lawsuits, judicial...