> what did you learn from this experience?
Basically, you need to be able to recognize your pain points and accept that you will need to periodically pay down technical debt.
Specifically, you need to pay down technical debt that has negative productivity.
For example: When I joined my current job, there were 1000s of compiler warnings, and the code was spread among 4 git repos. It is a C# product, and it had ~200 projects.
During my first project, one of the founders micromanaged me until I realized he was in over his head in the design. So I redid the design, and then said that my next project was cleaning up the warnings, and merging all the repos and many of the C# projects.
It saves HOURS each day; but it only worked because the founder recognized that he had to let go of some control to me. (Refer back to my point about paying down technical debt that has negative productivity.)
(I didn't tell him at the time, but if I wasn't able to clean everything up, I was going to walk away. I didn't want to spend every day juggling changes across repos.)