Are they not bound by the local law and regulation as any corporation or individual is regardless of their moral point of view? You could argue they could be principled and withdraw from China because of policies they disagree with but are compelled to comply with. But given the economic structure of electronics manufacturing in todays world that seems like a suicidal task.
I’d argue a more effective route is to comply as minimally as possible while advocating for improvement in policy, law, and regulation. Practically speaking if apple were to self immolate on principle a more compliant competitor will fill their vacuum. How is that advancing any agenda?
I feel you can both comply with laws and regulations and take the stance they are wrong and publicly advocate to the extent you’re legally allowed for their reformation without moral hazard.