Checking future result of arithmetic where a wraparound is undesired or undefined, is a basic skill every C programmer should know.
C is not a scripting language. If you use the tools available to you, and don't abuse the language, then it is fairly hard to cause undefined behavior.
And with every discussion of undefined behavior in C on this site, there's bound to be some user who's telling the world how they're "holding it wrong".
I guess the best solution is to move to other languages (IIRC Ada and rust are relatively free from surprises in their UB) and let language lawyers optimize C to death (by attrition).
C is not a scripting language. If you use the tools available to you, and don't abuse the language, then it is fairly hard to cause undefined behavior.