Secure is relative here. In this case, it would exist in one additional place (besides your possession) if the whole key was stored on the document.
You can also break up keys into multiple parts, such that you need N pieces of M total to recover the key. e.g. N = 2, M = 3: you derive three subkeys, two of which are needed to recover the key. Or, you could require the key stored in the will, plus any number of other keys for recovery.
Cryptographers have spent a long time doing math to make these kinds of key systems possible. I've gone down many a wikipedia rabbithole in the past about such problems.
If yes, how to achieve that without compromising the security of encryption of all your data?