Costs of replacing its workforce with robotic equivalents?
That would be a capital expenditure, and not counted against profits. Also, even if it is counted against profits in Taiwanese tax law, presumably they wouldn't make such an investment unless they thought it would pay off in the long run by having fewer employees.
I look forward to all the people who complained Apple was "exploiting Chinese workers" by having Foxconn make iPhones in China (at wages that while low by western standards were high by Chinese manufacturing standards) who will complain that Apple is "leaving Chinese workers unemployed" if/when Foxconn starts automating their production...