The Republican Party foreign policy establishment has joined Democrats in roundly criticizing Donald Trump’s background and undiplomatic temperament. Nevertheless, Mr. Trump has laid bare flaws in policies of recent presidents that have undermined U.S. security interests and American prosperity.