Another thing, tangential to what you talk about: if you have a junior programmer who
does write some silly pattern, such as a 25 long if/else chain, you can notice that in code review and have a conversation with the junior programmer. Talk with them the possible alternatives; talk about switch, talk about lookup tables, discuss pros and cons of each solution. In the end, you have a better, slightly less junior programmer who will be more conscious of the choices they're making in the future. Repeat a few dozen times across a few years and you have a senior programmer.
You can't do this with language models. They don't learn. You can write in your CLAUDE.md stuff like "avoid long if/else chains" of course, but 1) cluttering the context with lots and lots of micro-managing instructions has its own downsides, and 2) you don't want a list of rules, you want deliberate weighing of the trade-offs involved in choices made.