Germany’s economic agenda is shifting from cars to defense as the United States retreats and Russia threatens.