You seem to believe that one must reach backwards to the constitution in order to justify any new restrictions on your freedoms in a nation where we have happily redefined commerce within a state as subject to regulation based on the commerce clause. Let alone the general welfare clause.
In fact powers are so broadly construed that the only barrier is enumeration of a restriction in federal law and non violation of fundamental rights.
You have no more fundamental right to sell a locked down device than to build a store without proper fire exits. We didn't need to wait for fire exits to be built and vote with our feet.
People in this comment page keep drawing parallels between “a hardware device whose software I cannot modify” and things like fire code / health and safety laws. If you think there’s actually a line connecting those, draw it. I’m not seeing it.
You can argue until you are blue in the face that you don't think such a law is needed or a public good but I fail utterly to understand why you think it would be illegal.
Is such a law constitutional?
It's ridiculously broad but not infinitely broad. It's fairly trivial to suggest that allowing users full control of their own devices serves their interests.
A deliberately silly idea is liable to fail to hit the mark as far as the point. What if it was made a law that one must wear clown masks in the grocery store or all paint your nails before appearing in public?
Notably, one of the most fundamental principles of US government is specifically the notion that the majority, even a supermajority, can’t infringe on the rights of a minority. We’ve screwed this up in plenty of cases, but that doesn’t suggest that the underlying goal is invalid and we should steer into the skid.