Wow that's disturbing. I read about this a while ago but I thought it was just some statistics gathering software or something. I had no idea it was actually recording keystrokes on an unencrypted file, according to
https://www.cnet.com/news/keylogger-discovered-on-some-hp-laptops-conexant/. Either way, this is why I support open-source software. Everything is up for review, so you know exactly what you're getting into. I have stopped trusting Windows for some time now, opting for Linux for more sensitive activites, and this just proves I'm right.
As for hardware wallets, I have to be honest that I have no idea how they work internally, but the fact that they have been completely safe thus far suggests that they're quite trustworthy. There are probably some out there that houses hundreds of thousands of coins. But then again, there are only no incidents until there has been an incident, so that could change in a hurry. I personally still trust them because it's not like they're running on some kind of freemium model, but that's just me.