18 USC 227
(a) Whoever, being a covered government person, with the intent to influence, solely on the basis of partisan political affiliation, an employment decision or employment practice of any private entity
(1) takes or withholds, or offers or threatens to take or withhold, an official act, or
(2) influences, or offers or threatens to influence, the official act of another,
shall be fined under this title or imprisoned for not more than 15 years, or both, and may be disqualified from holding any office of honor, trust, or profit under the United States.
First of all, it doesn't say on the basis of political speech. It says on the basis of partisan political affiliation. You can't stretch one set of words to mean something much different. And while political speech may be an indicator of political "affiliation" -- if, for example, someone states "I am a Democrat" -- it often is not. Is John McCain a Democrat because he has spoken out against the Graham-Cassidy Act?
Second, the law specifically applies only where the government official takes or withholds, or offers to take or withhold, "an official act" or influences, or offers or threatens to influence the "official act" of another.
Official act =any decision or action on any question, matter, cause, suit, proceeding or controversy, which may at any time be pending, or which may by law be brought before any public official, in such officials official capacity, or in such officials place of trust or profit.
Not applicable here.
This provision is very narrowly drawn. The wording is plain and clear. You just choose to ignore the law's plain wording.