I have a directory full of prebuilt wheels for the entire dependency chains of several python applications I use. All you need to do is tell python to build all the wheels and save them to X directory, and point it back at that directory for installing.
In particular on Termux, there's a number of rarely-used python programs that have native dependencies, so I store them on my network drive to free up storage on my tablet. I have a similar setup for doing stuff on Colab.
It's entirely possible to use python/pip in an offline environment, as long as you've planned for it ahead of time; all you need is pip and possibly wheel, and the correct version of python.