if you do check the debian postgis repo, you ll find that its NOT possible to choose a postgis version.
its possible for postgis 2.4 and 2.5, then ALL 3.x versions are inaccessible but one, that did change from time to time.
(you MUST ask for postgis 3 without being able to ask for 3.0 or 3.1 or... its like asking for postgres 9 without .5 or .6)
2 of my customers reverse to a RH family linux because they have been unable to install the requested postgres/postgis version on debian.
when I did ask the team, the reply was: we cannot package for all cross possibilities (ie. 5 postgres x 6 postgis, less some impossibilities according to postgis matrix)
Maybe I am not understanding this, but have you checked the UbuntuGIS source? I know not pure Debian, but...
We run both Ubuntu and Centos servers. The change to Centos licensing has led us to support it only for one specific application that is embedded in Centos that we are trying to end-of-life ASAP. At least Ubuntu server has a 5 year support window, and Ubuntu has now announced a limited 'free' Pro option for smaller businesses that provides a 10 year window.