I tried out a tool that helped you do that, but i can't remember the name. Maybe it rings a bell to someone ?
Basically it was a dotfile manager (which you use to save your config files and deploy them on a new install), which also recorded which packages were installed on your system. It would output a bunch of bash scripts which you could customize and save on a git repo. Running those bash scripts would install all the mentioned packages with the configs you have saved. It may have been Arch only, i can't remember.
There's a bunch of dotfile managers listed on this page, such as chezmoi and yadm, but i'm not sure if one of them handles packages as well.
Realistically the list of tools you really need to reinstall on a new system shouldn't be very long. Personally i just reinstall a bare system and install tools if and when i need them. The advantage is that you don't carry over bloat from one system to the other. Do you think it would be applicable to your use case ?