I have similar experiences. Sometimes, as part of a fix for an investigation like this that I'm tasked with, I simply take the three days and build the actual correct solution. Or I build part of it, use it to partially automate what I'm investigating, and then continue to build on it next time a similar investigation comes up. Once I'm done with the better solution, I present it to the people who would use it, and transition them towards using that.
It's not always possible depending on the type of organization. A lot of managers are offended that you would work on something they didn't ask you to work on, even though they would never think to ask you to work on the thing, and even though the thing you work on pays for itself over a short period of time.
Other times I just say fuck it. If you want to pay me to do the same investigation over and over, I'll mentally check out while I collect my paycheck and spend my extra time teaching myself skills for my next job.