Hon Hai Precision Industry Co. reported a better-than-expected increase in quarterly profit, signaling robust global demand for AI hardware.