China’s industrial enterprises had their first annual gain in profits since 2021, as producer deflation showed signs of easing.