Knowledge is usually not the problem, it is the shortcuts(or short-term decisions) that got them to a place where they can no longer operate the platform they need to survive. Often this is the cause of prioritizing velocity over anything and everything else. This is choosing the do it fast and do it cheap options with the assumption that it is always correct. That assumption of course is almost never true.
By the way, most cases where I've seen this there's usually an investor involved and they need to impress them.
And cutting every corner to get the cheapest possible product out might not have even been the wrong call! Presumably most things made this way fare just as well as they were expected to and die quickly after being made, not spending scarce resources on making them better was probably the right thing to do.
It just sucks when you end up having to maintain strict backwards compatibility to something that was made in two weeks by one guy who took every shortcut on the way to duct-tape together something that technically does what was asked for. (Yes I'm thinking of you, javascript.)
Assuming they know and/or have the capability to do it, between the cost of correcting the issue and push to use AI into everything meaning raising any issue now, politically speaking, is a direct criticism of someone major VP pet projects. I personally simply started to log stuff.
The first thing they need to do first is acknowledge there is a problem to begin with. I am so glad I am not an actual programmer though. It would drive me nuts.
The environment that creates "rescue" projects is usually not one where long term thinking is prevalent. It would be a pet project of someone who's still there or someone who left but where the ultimate decision maker is still there. Either case, you need to walk on egg-shells and be mindful that dealing with the technology problems is the easiest part of such an engagement. I'm not ashamed to admit that I've learned that lesson the hard way.