But it's deeply mistaken to oppose smaller (or more correctly: simpler) classes/functions and layered architecture.
Layered architecture and simple (mostly small) classes and methods are critical to light cognitive load.
e.g. You should not be handling database functionality in your service classes, nor should you be doing business logic in your controllers. These different kinds of logic are very different, require different kinds of knowledge. Combining them _increases_ cognitive load, not decreases.
It's not mainly about swapping out dependencies (although this is an important benefit), it's about doing one thing at a time.