The Management API can help.
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-group~v1.9.1%20
This will give you an idea of how it works and then you can go from there.
Use a SmartConsole admin account. fwadmin is an example admin account.
Expert mode on the management server CLI:
mgmt_cli login user "fwadmin" > api-sid.txt
mgmt_cli -s api-sid.txt show groups
mgmt_cli -s api-sid.txt show group name <one-of-your-groups> --format json
mgmt_cli -s api-sid.txt show group name <one-of-your-groups> --format json | jq -r '.'
mgmt_cli -s api-sid.txt show group name <one-of-your-groups> --format json | jq -r '.members[] | .name'
The commands log the admin into the API, saving the login result details to the text file. That includes the Session ID.
Then the authenticated session is used to run API commands: show groups and show group
Then jq is used to start to filter the output.
Eventually you will get output that can be used in an API command to create new objects and groups on the new management server
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-group~v1.9.1%20
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-objects-batch~v1.9.1%20
https://sc1.checkpoint.com/documents/latest/APIs/index.html#tips_best_practices~v1.9.1%20
[Expert@management:0]# mgmt_cli add host --batch API-objects.csv
Check Point shares this too:
https://github.com/CheckPointSW/ExportImportPolicyPackage