I use Ledger Nano S. Of course you can recover the keys if the device fails. You don’t rely on the device itself. Just save the seed phrase and don’t lose it. Let me explain.
I believe the ledger nano s generates a seed phrase with a standard known as BIP39. This means that even if the device fails you would be able to recover it with any wallet that supports this recovery phrase. It could be another Ledger Nano S or a completely different wallet. It can even be a hot wallet as well. However, if you do get a hardware wallet please don’t enter your seed phrase into a hot wallet. By doing this you would have removed the whole point of the hardware wallet by allowing your keys to be in the hot wallet. (You always have to look at the weakest link, just like in electricity.)
Here is a tool to get your private keys even if you can’t find a wallet with the BIP39 recovery phrase function: https://forkdrop.io/using-ian-colemans-bip-39-tool
Be careful when you recover your private keys. If your hardware device fails, the best way to recover your keys is to get a new hardware wallet and restore it that way.
I hope this makes you feel safer. Hardware wallets are considered to be the safest way to store your cryptocurrencies.