A few years ago i imagined worst case scnario (I must admit you have a better imagination than me ) and i found a solution for that : what i do is store all 2fa totp codes in an encrypted keepass vault and remember that password instead of keeping it in password manager since it is encrypted it doesnt matter where i upload it but ofc for max security and privacy , e2e cloud services like filen/mega are a better option ( better to upload them to at least 2 just in case) then take the link of that file and use link shortner (use at least 2 again just in case) , and have something like bit.ly/2fa which u can access anywhere whenever i have a new 2fa entry i just upload the new vault in same directory as before , with file versioning , i have all previous vaults in same place with same link