The whole point of the risk is to involve you in some serious gameplaying decision making before you take the risk. If you decide upping the item is worth the risk, you are SIMULTANEOUSLY deciding that you are willing to risk losing it (or its features) and that you could live without it if you had to. If that is NOT the full decision that you are considering and making before plunging the item into the light, then DON'T ENCHANT. A 5% chance WILL DISENCHANT about 1 time in 20 attempts.
A strategy to mitigate the disappointment is to wait until you have a second identical or very similar item before beginning to run up enchants. (Despite the name, Unique items are not unique.) Enchant the items alternately until one fails. Then STOP enchanting (until you run across another duplicate.
FWIW, I virtually never enchant at the town enchanter, except with very high level items. The enchantment based on item level instead of current character level, plus the doubled chance of disenchanting is just not worth it, even when I've got piles of gold.
Disenchanting weapons is almost never a permanent disaster, unless the have some Very Unique characteristic on them, like a Barter Skill enhancement or something. Almost all of the valuable weapon enhancements are the same ones that you are most likely to get from re-enchanting (phys & elem dam, +crits, health drain, etc). Additionally, you never lose any sockets you have already added. Since you are re-enchanting from a higher character base level than you were working from the last time, and possibly with more accumulated Treasure Hunter Skill, when you do the re-enchanting via dungeon Shrines you are almost certain to get more substantial buffs than on the previous cycle of enchantments.