The key to creating software that is easy to understand and maintain is to clearly define and encapsulate the functional and non-functional subject matters in your system under development. I was first exposed to this concept about 28 years ago, and the method for doing it was already quite mature at that time.
https://xtuml.org
https://xtuml.github.io/xtuml.github.io/xday/xday2020.html
#FOSS at the next level.