Tying software support to how long the hardware lasts will ensure that every hardware manufacturer builds in a time-based killswitch into every device they make.
Then users should be compensated when the manufacturer decides to remotely kill their devices (whether by a kill switch or by stopping maintaining the software).
Then we will simply see fewer and more expensive models available for sale as some manufacturers and investors decide these regulations are too much and exit; others will raise prices to pay for the compensation and extended software support.
Software engineers are expensive.