In other words, knowledge on how to do that without Whonix, how to modify the Qubes Debian template is prerequisite knowledge.
The only realistic way to learn how to do this is to remove the Whonix specific part form your question. If you can figure out how to do that using the Qubes Debian template, then you could apply the same technique to Qubes-Whonix templates.
It’s certainly possible. It’s 100% Open Source. But it’s also non-trivial. Requires the ability to work with huge, complex build scripts, code bases.
The probably non-existing documentation is a Qubes issue. Not a Whonix issue.