I don't have enough in-depth knowledge to know to what extent de-skilling is really happening
Anyone who thinks that programming is getting easier due to automation isn't a programmer.
A builder builds a wall. A week later, bricks begin to fall out of the bottom, but he continues to build the wall higher.
There is an important question here. Did the builder know any better, and should the builder be expected to know any better?
If this is something that is clearly taught in brick laying school, and the company expects their builders to conform to the rules of bricklaying school, and the person just knowingly willingly continued on, then the builder's company "technically" should suck up the cost. This is not the client's fault.
Whether the builder is fired or has to fix it outside of hours is a completely different question. That's up to the discretion of management. If the builder had continued on their merry way knowing they were doing the wrong thing, then asking them to fix it outside of their paid hours could be a good learning opportunity. Or if it's willful negligence then maybe it's a firing issue (if the building will fall down). Of course the best way to get them to learn their lesson is to show them the impacts of their work - now everyone has to stay back and fix their shoddy work, and they won't be popular for a while
However, if this is something that isn't taught in bricklaying school, but is something that only a bricklayer with 5 years of experience should know, and this dude was a fresh-faced apprentice, then the company needs to ask themselves "should we have had better quality control methods to stop this problem occurring earlier?". Should he have been supervised? Should he have been doing it in the first place? Should someone have inspected his work periodically?
This is actually quite a good question and not a silly analogy.
The next step is to try to apply this to software engineering. As we all know, building a wall and fixing up a shoddily built wall is quite a different thing to fixing bugs. Most (I would hope!!!) bugs are not caused intentionally or as a result of willful negligence. If a developer is committing work that is full of bugs and other people are building on top of that work, The same analogy applies as to the builder scenario. You expect someone to work according to their level of expertise. If they don't, you better start reviewing their work more often or move them to an easier task.
In order to get a loan you must first prove you don't need it.