It is safe to store encrypted data for 5-10 years, but not all drives last that long.
I worry that, if I store and forget the data, it would not be possible to open the container any more at some point in time (5-10 years).
There is no reason why the encryption itself would fail to work after 5 or 10 years. As long as you remember the password and the drive is still working, you will be able to decrypt it. The algorithms that are used have a very long life. Even old algorithms like DES from more than 10 years ago are very easy to use. Simply put, encryption algorithms do not care at all about the current date.
Think about it this way: A 10 year old hard drive with a SAS interface (2004) encrypted with AES (2001) and formatted with the NTFS v3.1 filesystem (2001) would not only be trivial to access on modern hardware, it would not even be out of place to see today! Even a 20 year old hard drive with a PATA interface (1986) encrypted with 3DES (1998) and formatted with the FAT32 filesystem (1996) could be easily accessed today, in 2018. And you're worried about only 5 to 10 years?
However, I need to point out that 10 years is a long time for a hard drive. Even if you are keeping redundant backups (e.g. by using RAID 1), you are risking the hard drive itself dying from old age. Encryption will not prevent the drive it is stored on from dying. If you do need long-term archival, there are plenty of resources online to learn how to properly store data for decades.
Another issue is whether the whole container could be damaged by a couple of flipped bits here and there.
That depends on which bits are flipped. All block ciphers (such as AES) require a mode of operation to work properly. Modern LUKS setups typically use a mode called XTS. Being a narrow block mode, a single bitflip will always corrupt 16 bytes (128 bits) of data. This may be enough to cause corruption in the underlying filesystem, but a corrupt filesystem can almost always be fixed, usually using automated repair tools. It is important to realize, though, that it is more likely for an entire sector (usually 512 or 4096 bytes on modern hard disk drives) to fail. It is fairly uncommon for only a single bit to be flipped, but not uncommon for a sector to "go bad" all at once. The hard drive will make a best effort to recover the sector's contents and copy them to a fresh sector, but it can only do so much. If it is unable to recover the sector, it is marked as damaged and is lost.
LUKS also contains a feature called "anti-forensic key splitting" (see page 10 of this document). This is a cluster of data spanning typically 250 KiB and contained in the 2 MiB header. If a single bit is corrupted in that region, the entire volume can be lost*. Its purpose is to make it easier to erase data quickly in the case that erased data can be only partially recovered, but it also increases the risk of accidental data loss. Unfortunately, this feature cannot be disabled in the current version of LUKS. Unless the header itself is damaged, the rest of the volume should remain intact.
Because this feature cannot be changed when using LUKS, it may be better to use different disk encryption software. VeraCrypt takes the opposite approach of LUKS, not only making its header as compact as possible, but keeping a copy of the header just in case the primary header is damaged. Linux fully supports VeraCrypt when a modern copy of
cryptsetup is used. It does not require any extra software and even uses dm-crypt as a backend, just like LUKS.
How do things like LUKS actually last?
I would only start worrying when the data approaches half a century of age. At that point, you run a high risk of not having access to any hardware which is capable of interfacing with your storage device or executing the LUKS software. After that much time, it's possible that even the LUKS specification will be lost, making it necessary to reverse engineer the format. If you are only storing data for 5 to 10 years, you do not have to worry about that kind of thing at all. I have storage drives with data that old and have never had any problem. The only thing you need to worry about is your storage medium failing due to age, which you can deal with by keeping redundant backups.
Overall, there are three things you need to keep in mind when archiving data that long:
Algorithm support. Encryption algorithms that are well known will continue to be supported for a very, very long time. There is no reason to worry about an algorithm like AES becoming ancient history after a mere 5 to 10 years. In fact, it will likely still be the most popular!
Storage medium compatibility. Over time, interfaces for storage devices become obsolete and the hardware required to interface with them becomes harder to find. This starts to become an issue as the age of the medium begins to be measured in decades. Even with this issue, for a popular interface (like SATA), chances are you will find plenty of retrocomputing fans who will know how to access data on even the oldest of devices.
Storage medium health. One thing you cannot prevent is the progression of time slowly damaging hardware. While some types of media last longer than others, everything will break down. I would be very uncomfortable keeping extremely important data on a hard disk drive or a solid state drive, but I would not feel too worried keeping it on an archival DVD. It's important to periodically test your backups to make sure the hardware still works.
To reduce the risk of loss of data loss when archiving, you should follow the 3-2-1 rule. This rule states that you should have at least three separate copies of your data, of which two should be kept on different types of media, and one copy should be kept at a remote location. The specific kind of media you will want to use depends on multiple factors. In general, you should know that:
High-capacity tape drives last for a long time, but require expensive hardware.
Archival DVDs† last a long time, but have a low storage capacity.
Archival hard drives don't last as long as some solutions, but have a high capacity.
Solid state drives begin to lose data in the span of years to decades.
* While a single corrupt bit in the header can corrupt the entire volume, it is still possible to recover it by using a brute force attack. If more than a single bit is corrupted, the chances of recovery become significantly lower. If an entire 512 byte sector is lost, which is the normal failure mode of modern hard drives, there will be absolutely no way to recover the encrypted data if that sector was part of the LUKS header itself.
† There is a lot of misinformation about archival DVDs out there, in part because "archival" is not a formal term and anyone can slap that label on their products. If you buy one, do your research first! Otherwise you may find yourself buying a sub-par product. In particular, be skeptical when "gold discs" are mentioned.