Putting your code on GitHub and meeting the requirements to inclusion in their Arctic Vault would put it on storage designed to last 1000 years at least [0]. They use film reels for storage [1]. Then again, retrieval is not super easy ;-)
[0] https://archiveprogram.github.com/arctic-vault/ [1] https://www.piql.com/