> 2. If it's doable, any tips for what to try next?
Either control recursion depth or implement an ancestor table.
The use cases you propose are certainly doable, but you may need to
deal with pressures that come up to implement nested groups that are
user defined and/or where ownership is reassignable. A non-existant
group can't be a parent, but you'll have to check for circular
memberships if you allow users to change the parent id after creation.
If you allow arbitrary depth to nested groups then you'll lose the
ability to fetch all descendants of a group in one query unless you
implement a join table for ancestor relationships. That carries its own
performance penalties, but avoids access time expansion exponentially
proportional to the nesting depth.
Chris Babcock