That hack had nothing to do with Electrum and everything to do with the fact the user in question was using a hot wallet on a machine which had malware on it. No wallet software can protect against that.
I would like people to tell and discuss that after installing Electrum wallet on the computer, what additional steps they should take so that there are minimal chances of their funds being hacked by the intruders and hackers.
There is nothing else he could have done in regards to installing Electrum itself. The steps he should have taken include not using a terrible OS like Windows and ending up with a device full of malware, not installing spyware software such as Google Chrome, and not using a hot wallet in the first place. If you install any hot wallet on an insecure machine, then your funds are at risk.
You can use Electrum safely by setting it up as a cold wallet or as a multi-sig wallet, or you can use a hardware wallet instead. But if you are going to use it as a hot wallet, then it can only ever be as secure as the device it is installed on, which in this case was not secure at all.
I don't got why like a huge majority of bitcoin/crypto holders wouldn't just buy a Ledger/Trezor. If they just use a reputable hardware wallet and just keep the backup offline, that's pretty secure enough for long-term holding. But nooo, most people wouldn't want to pay a measly <$100 for security.
Even more ridiculous in this case since the user owns a Ledger device, but just didn't use it.