With that said - the process of fixing those old mistakes is greatly aided by llms... but you still need to understand what you are fixing, and understanding why giant blocks of code are copy-pasted everywhere, or why convoluted hacks evolved over time as reactions to bizarre underlying untreated bugs is, imo, ultimately a human/organizational/processes problem.
Anyway I think you are bang on.