This is a solved problem. Entities that have to custody large amounts of crypto use multi-sig wallets where N of M keys are needed to unlock them. The keys are given to a N people and kept in different locations. If someone dies, N of the remaining people can move the assets to a new wallet.