Earlier quoted context omitted.
Yes, but you pay a real cost for those choices too. A management plane that is non deterministic, imperative, and full of highly mutable state, not to mention basic stuff like the package manager metadata and cache not being shareable, and package installs all having to be serialized because they all call shell scripts as root. These limitations constrain even tools like dagger from providing a first class interface…
I'll bet $20 your solution to the problems you posed is "Nix"
For a less controversial take, consider alpine's apk package manager. For a single-use container that runs one utility in an early dockerfile stage, apk can probably produce that image in 2-3 seconds, whereas for an apt-based container it's more like 30 seconds. That may not matter in the grand scheme of things or with layer caching or whatever, but sometimes it really does.