I have had similar problems with my SE and I have found some workarounds that I think could fix your problems. When compiling an archived program on the SE (not on the basic ti-84+) Axe occasionally will truncate the name of the produced program or straight up refuse to compile saying that the output name is incorrect (even though it is fine). I looked into this a bit and it seems to have to do with where the variable is located in flash. In most of the cases I bothered to investigate, the variable was usually located close to the start of the page. The longer you go between garbage collects the more likely it seems to occur. Assuming your problem is the same as mine, it is relatively easy to fix. Just garbagecollect more often than usual. I would do it once every 20 hours of programming unless you are writing huge (16k+) programs to flash every couple minutes.
Archive error might be a problem but I rather doubt it. I used my old ti-84+ very heavily for 3 years and I never had any problems with the archive wearing out but it isn't nearly that old. I don't actually know what happens when the archive starts to go bad but I would assume that certain bits would stick into either the set or reset state and refuse to change. I would suspect that that would just cause your program to contain garbage when you save it to archive (or the header if you are really unlucky). I can't imagine that a bad flash would cause programs to suddenly vanish even if you are so colossally unlucky as to have the size entry of the program corrupted. On a ram clear, the OS goes from program to program in flash to build the VAT. It sees deleted and non deleted programs. Archive undelete works because when you delete a program in flash the OS doesn't remove it, it just sets a flag on the program saying 'this is deleted, ignore it'. All the data is still there and all you have to do to recover it is copy the data to a program in ram. All garbagecollect does is delete all the entries with the deleted flag set. (due to how flash works that is actually a complicated process) So even if you have a bad size entry, that should only break programs you archive after the corrupted one. It shouldn't have any effect on programs that have been archived before.
If you are only working with ti-basic, why are you bothering to archive your programs? Unless you are using some unstable libs there is no way your calc can crash. Just edit them in ram.
Another way to recover your data is to have a program that copies all of ram to a program. Assuming that the calc didn't crash on the error your program still exists in ram. It just doesn't have a VAT entry. Copying it all to a program could let you recover a good chunk of what you were just editing if you are willing to sift through a bunch of garbage data.
I would really recommend zStart over Doors for programming. Its tools like jumping to labels, copying and pasting, and being able close a program editor without saving the changes are really really useful.