According to the apt-get man page, you can provide a config file for the package.
-c, --config-file
Configuration File. Specify a configuration file to use. The program will read the default configuration file and then
this configuration file. See apt.conf(5) for syntax information.
Also note the -y option for automatically answering yes.
-y, --yes, --assume-yes
Automatic yes to prompts. Assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as changing a
held package or removing an essential package, occurs then apt-get
will abort.
According to this thread on the ubuntu forum, you can discover the questions or pre/post scripts in the DEBIAN folder of the deb archive, modify the scripts and repackage the deb. However, another remark is that sometimes an ncurses gui is used which makes things difficult. In short, there does not seem to exist an easy solution..