Flarum doesn't have any group hierarchy natively, so even extensions can't really hook into this without creating their own hierarchy system.
Only the admin group has a special ID and is not deletable. We have actually used this in another feature where we prevent non-admins from removing the admin group of another user when they have the permission to edit user groups.
I feel like this feature is best left to an extension, you could have a new setting where you select groups where only members of the same group can edit posts.
For a more regular use case where every user with edit ability is supposed to be trusted, I think having audit logs and backups should be enough.