Debian's installer accepts a preseed file that will automate answering the questions it normally asks.
You can also ask Debian's package manager for a list of packages marked as manually installed (apt-mark showmanual
) and then use it to install those same packages on a fresh system. I think there's a more formal way to do this as well, but I haven't needed it in so long that I forgot the details. :P
As for why most distros don't consolidate all the configs for all system components in a master text file, I expect the main reason is the Unix heritage: A great many of those components have been around for longer than Linux has existed, or derive from those that have, and their configurations evolved separately. (Almost all of them are configured with text files, though.)