Is there a self-hosted alternative to Facebook groups?
With similar features like moderation, anonymous posts, public/private groups, etc.
Not one that anyone will use. The benefit of something like Facebook Groups comes from the network effect, in that people want to use it because other people are using it.
Buy a XenForo[0] license and call it a day. It has all the staples of social media. 'Likes', 'Follow', 'Friend lists', 'Karma' etc
[0] https://xenforo.com/
I think if they made something like lemmy but for mastodon users would be cool.