Install the required package once manually, going through the configuration options you want. Then, do the following:

$ sudo apt install debconf-utils
$ sudo debconf-get-selections | grep MYPKG > MYPKG.CONF

To be able to re-install MYPKG to a new machine without any user input, copy the MYPKG.CONF file to the new machine and do the following:

$ sudo cat MYPKG.CONF | while read line; do echo "$line" | debconf-set-selections; done
$ sudo DEBIAN_FRONTEND=noninteractive dpkg -i MYPKG.deb

Tada! The package has been installed with the right configuration options without any user input.