A person casts a ballot into a box.

Friedrich Merz, who has no previous experience in office, is set to become Germany's chancellor with Europe's largest economy ailing, its society split over migration and its security caught between a confrontational U.S. and an assertive Russia and China.