You can solve this in a simple way: Spend a fixed percentage of your time on fixing your tools, the rest on the actual work. The fixed portion should not exceed 20% or so.
Like that you stay productive and you incrementally improve your work environment.
Obsessing over your work environment is just as counterproductive as obsessing over the work itself. A healthy balance is the main ingredient to increasing productivity in the longer term.
But how long do you spend setting up the time-tracking process that ensures you don't exceed you 20% time frame in a given day/week/month/year? And don't you also have to track that time as tool-time? How do you even do that without your time-tracking system up and running?!
Facetious, i know - but this is a confessional, the OP is basically saying he isn't capable of separating his time out like that - he would get drawn into the optimization process - like an addiction and blow past he's 20% allotment.
If a person is able to maintain the don't go over 20% of your time on optimization then by definition they aren't dealing with the same issue as the OP.
Like that you stay productive and you incrementally improve your work environment.
Obsessing over your work environment is just as counterproductive as obsessing over the work itself. A healthy balance is the main ingredient to increasing productivity in the longer term.