I've upload the source code
https://github.com/DavidPhillipOster/ContactGrouper - an app that lets you easily manipulate which groups a contact is in.
Surprisingly, it doesn't work on iPhone, but does work in iPad, iPhone simulator, and on Apple Silicon Macs.
I'm using a Developer Tech Support request to try to track down why.
But I'd be pleased if you took a look at it, if you have any suggestions