I'm probably going to sound silly now but I do this when doing any technical work I deem important or critical enough, point and say outloud what it's for or what state it should be in or in the imperative what to do to it... it does work, it somehow catches silly mistakes compared to keeping everything in your mind, and also gives you confidence because it works like a checklist.
What you're describing is very similar to Rubber duck debugging. The idea here is that forcing you to explain what you're trying to do makes it easier for you to catch your mistakes.
It's similar to why formal verification is so important in hardware, because it's effectively forcing you to be specific about semantics and let's the computer walk through things for you.
Known as pointing and calling in transport AFAIK.