Optimized inspection planning as a method for reducing failure risks