These companies have become, for many, infrastructural. For these companies (who also sell advertising) to take these kinds of actions would essentially be them bypassing campaign finance rules to give MASSIVE contributions of free advertising to candidates. I think its fair to argue that that would be unacceptable interference.
But should it be illegal? IMO -- no. If this is the hill that some company wants to die on, let them try. Why not?
Thought experiment: If there was a political candidate running on a platform to destroy the internet, I think it would be perfectly reasonable for internet companies to vouch for the competition.