There are two ways you could get “locked out for good”:
- The encrypted file is corrupted. Because strong encryption necessarily strips out as much redundancy as possible from the original data (any remaining redundancy provides clues that help crack the encryption), an encrypted volume is more vulnerable to being irreversibly scrambled by bit errors than an equivalent amount of raw unencrypted data.
Solution: Keep backups. For obvious reasons, these should be extra copies of the encrypted files, not copies of the original data. (Also keep backup copies of the encryption software, though something like TrueCrypt should be easy enough to find and re-download if necessary.)
- You forget your passphrase.
Solution: Keep a record of your passphrase in a secure location, or make damn sure it’s something you won’t forget. For the latter option, you probably want to pick a technique for generating a long pseudorandom string from an easily memorized phrase – “first letter of each word” works well enough if you have enough words.