Even if that were a valid legal excuse (and it is not clear that it is), it doesn't hold up to moral scrutiny.
But realistically the reason they all bent the knee to Trump is probably not because they were cowards or because they wanted to protect their shareholders, but because they welcomed him being elected.
Partly because they knew it would kill off the anti-trust enforcement that was finally starting to gain steam with Lina Khan's FTC and partly because they are rich enough to play Trump's corruption game, where as long as you pay him off and linguistically publicly fellate him once in a while the world is your oyster.
(I don't like it but that doesn't make it false)
By your theory, couldn't (presumably other) shareholders sue over what Apple actually did? Like, maybe cowing to Trump has done damage to Apple's brand, in violation of fiduciary duty.