The government of Chancellor Olaf Scholz blocked the sale of a semiconductor company to a Chinese-owned firm on Wednesday, as Germany seeks to toughen protection of its domestic technology and ease its dependence on China. Robert Habeck, Germany’s economy minister, said that the government had also blocked a separate investment in a German company producing critical infrastructure, which he said could not be identified because of secrecy agreements. The moves come days after Mr. Scholz returned from a trip to Beijing, where he met with President Xi Jinping for discussions that focused on Russia’s ongoing war in Ukraine, as well...