Adding one practical thing to the inventory step, because doing it by hand through a UI for a dozen apps is miserable and error-prone.
Whichever container runtime is underneath, it can tell you the full configuration of a running container — image, mounts, environment, ports — in one command, as structured output. Dump that for every running container into a file now, while the catalogue is still limping along, and commit it to a git repo somewhere off the box.
That file is your migration plan. It is also the thing you will wish you had if the box dies mid-migration, and it costs you thirty seconds.
After that, writing the compose files is transcription rather than archaeology.
One caveat on the dumps: environment variables will include secrets in clear text, so that repo is private or it is on a USB stick in a drawer, not on a public host.