The amount of resources you have used is astonishing which is why should have a safe state when it comes to enhancing. When you reach +5, your failed enhancement attempts will not revert to +4 anymore or they should have a 100% restoration scroll which grants 100% restoration after a failed attempt. They should learn from other MMORPGs.