The secret of their profitability is the intangible nature of their major assets - patents, trademarks and other intellectual property.
These can be transferred to their preferred tax-haven at will, then licensed to Apple subsidiaries worldwide. The result is a cash stockpile larger than the GDP of Hungary, conveniently channelled offshore.
They have very few 'real' assets. No factories of their own, so production can be increased or decreased as required. Little inconveniences such as redundancy & employee-related taxes are somebody else's problem.
If they are affected by the next economic depression, they could just do a Magrathea and wait for the economic climate to improve - fixing it is somebody else's problem.