The law has evolved to help balance the relationship between employer and employee. It dictates limits on employer behaviour and also limits on employee behaviour. Usually there is a formal structure (union) to act as the employee representative.
None of which is in play here. There are no employees, just volunteers. There is no union. Yhe action appears to be somewhat arbitrary. Why private groups? Why 48 hours? Has there been any formal discussions to the root dispute? Is there a union for API users? What link us there between API users and moderators?
So yes, the response seems heavy-handed, but the proposed action seems premature. The mods are testing their power and Reddit is responding. And there's no law governing any of this, on either side.