The president vowed to bring factories home. But tariffs, immigration policies and spending cuts are turning that promise into a costly balancing act.