No, this does not need legislation. If you don't wants ads on your refrigerator, how about not buying a refrigerator with a screen built in, it's not necessary.
https://www.mozillafoundation.org/en/privacynotincluded/cate...
If the fridge is in my house and hammers aren't banned yet then that fridge will not be showing me ads.
In many places, you can't legally buy gas outside of a gas pump that have a strong tendency to show more and more ads.
That said, I doubt these companies would sue because of the risk of setting a precedent in favor of the consumer. Scary legal letters (e.g. cease & desist letters) perhaps. But given enough customers, at least one will have the resources to hire a good lawyer and fight it all the way to court.
There's also the fact that the problem was never about touchscreens per se, but inappropriate/incompetent UI design that happened to use touchscreens.
Do you want to talk to my 70 year old father about how he should come up with solutions to ads on his fridge? Yes he can grab a garbage bag and some tape, we can all probably agree that the day stuff like that is commonplace we have very, VERY evidently failed as a society when it comes to dealing with this specific issue.