Code is speech. Forcing someone to implement something is legally-compelled speech, assuming no complicating factor like commerce.
That argument has been going on for decades, and has had few victories in the court system. The DMCA, which prohibits trafficking in anticircumvention devices, even though there's a lot of code in them, is still alive and well.
There is pretty solid case law for the constitutionality of a variety of compliance requirements. If you can comply by being silent then they aren't really compelling you to do say anything.
Is is also clear that there are major deficits in our Constitution but that the amendment process has failed to survive a modern world.
Any of our original forefathers would recognize today's American federal government as an overreach from their indended form of government.
The only reason we aren't seeing a Boston Tea Party 2.0 over the recent string of coordinated assaults against our inalienable human rights is because surveillance capitalism is already coarsely achieving its goals of suppressing any civic participation which exists between the spectrum of ineffective political protest to the most desperate, radical action.
Some of those among us simply cannot drink this koolaid. A quote from MLK, Jr:
I submit that an individual who breaks a law that conscience tells him is unjust, and who willingly accepts the penalty of imprisonment in order to arouse the conscience of the community over its injustice, is in reality expressing the highest respect for law.
Further reading https://letterfromjail.com/
I’m not a lawyer and even I know that argument would never hold up given the plethora of other laws that have been implemented through software. Not to mention copyright and patent claims too.