Implemented successfully with texlive 2022 and 2023 on Cygwin, requires tex utilities latexpand and latexmk (from texlive-collection-binextra)
1: use latexpand to pull all .tex sub-files into a single tex-file master-expanded.tex:
latexpand -o master-expanded.tex master.tex
(my .bib-file is in the same directory as master.tex so I'm not using the --expand-bbl or --biber options)
2: use latexmk with the -deps-out=FILE option to create a .txt file with remaining dependencies (graphics mostly):
latexmk -deps-out=master-dependencies.txt -silent -pdf master-expanded.tex
3: take the relevant bits of master-dependencies.txt and put them in a bash script to copy them into the same directory as master-expanded.tex. Approximately:
cp fig/pdf/semipar_grSh_elHygOwn_cert.pdf graphics/tilley-pit.pdf path/to/master/directory
4: open master-expanded.tex in a text editor and remove old paths to sub-files, for example replace fig/pdf/ with (blank) replace graphics/ with (blank)
5: to test things out, create a backup copy, then delete all the old sub-files and sub-folders (in my case, only master-expanded.tex, the bib-file and the files picked up in master-dependencies.txt) and try to compile.