A surge in global AI investment has helped the world's top manufacturer offset the export hit many had expected from the Middle East turmoil.