Hey,
Sadly API access to Groups is very limited but have a look at this thread for reference: Mass save model groups to path
Essentially @jacob.small’s idea is to save all groups in a new file, then sequentially SaveAs, delete and purge to create individual files each with a single group.
Best of luck, let us know how you get on
Cheers,
Mark