Germany will remove Chinese components from the country’s 5G mobile networks by the end of 2029, ending years of debate that had left the country dragging far behind allies in addressing what the U.S.