As President Trump and Elon Musk slash deeper into federal programs and the work force, G.O.P. lawmakers are leveraging their connections to try to insulate themselves and their voters.