BERLIN—Friedrich Merz, on course to become post-World War II Germany’s 10th chancellor after the country’s election, has vowed to prioritize European unity and the continent’s security as it grapples ...