Pete Hegseth, Trump’s choice for defense secretary, has assailed senior military leaders as having failed to safeguard American strength.