I do think that I have worked on somewhat complex code bases. The reason why they are complicated is often "political" (e.g. at some point it was decided that this is the way to go, and from then on the specific abstraction was used. It turned out these wishes were not a good idea, but the code was never re-developed with a "more proper" architecture (also for the reason that removing some insanely convoluted feature would anger some users)).
I see no reason why some (hypothetical) AI couldn't come up with a much better architecture (also good programmers are capable of this). The problem is rather "getting this architecture through politically"; for some reason "AI suggested/created it" is much more socially accepted by managers than "programmer X considers this change to be necessary" (I cannot understand why).
side note: indie games are not complex software.
and most "overvalued" and "impossible" and "walking it back now" comments are true in as many cases as they are not true and I really do not understand these commenters. smart people should not fall into the same category as people who think that "nobody cares" because they never met devoted lawyers, investigative journalists and law enforcers passionate about justice AND law. it's all so weird, man ...