I worked with a very intelligent software engineer with a PhD in CS who encountered orgmode and it enticed him into the same OC spiral you are describing. He resolved the problem by switching to lab notebooks (8 1/2 x 11" or A4 size, don't remember which) and writing design plans, test notes, everything in pen or pencil. This worked well for him but obviously would not be everyone's solution.