Just don't ever give your tv the wifi password. I have a thousand times more confidence at microsoft will keep the xbox operating system up to date and reasonably secure (yes, it has ads on the homescreen) than I do that any smart tv vendor will still support their crap OS in 5, 7, 10 years from now.
Use an xbox or a PS5 to drive the TV and run the apps on that.