German private-sector activity unexpectedly contracted as the Iran war triggered the biggest plunge in the services sector in more than three years.