It's worth noting that this alternative also didn't work, as several errors occurred.
So, we have the following questions:
Is it possible to perform an offline installation of PostGIS? If so, how?
Is it possible to obtain a list of all the required sites during the installation of PostGIS? This way, it would be possible to enable internet access only for these sites.
Yes, I had to manually determine the package names, but that was a one-time process. Now, I just update the version numbers in my Windows shell script.