I at times still write spaghetti code. I switch to functional if the repetition justifies it. It can be quite beautiful.
OT: I remember someone noting that he tried to have modular code with as little functionality per module but reached a point where searching for things took writing it.
I sometimes ponder if it would be possible to create a DSL for every tiny niche part of each application. It would likewise depend on how awesome the documentation is and if you can even find it.
I think LLM's could make both ideas viable. One would be able to find anything and figure out how it works.
Could have a committee that judges how reusable your language extensions are and possibly grades you as a programmer with hints on how to improve.
Writing the coffee machine DSL should give you bragging rights.
A bit like languages nowadays accumulate new features.
In an ideal world one would write functions, the repetition of those would be documented and spawn language features, repetition and usage of those would spawn features in the lower language in which the language is implemented which in turn would spawn machine instructions. All using real data in stead of a cultivated hunch or popularity contest. How many installs, how often does that part of the code run, how many cycles can we save globally.