Not sure about actually having protected collective bargaining rights (i.e., in the US subject to the NLRA), but pooling resources to have staff attorneys, etc -- certainly possible. e.g., the IWW tries to do this, organizing "unorganizable" workforces (most recently, for freelance journalists https://freelancejournalistsunion.org/)
The only issue I see is that lawyers are expensive in US relative to how low most of the beginner developers get paid on freelancer.com (you could earn 2.5$/hour or less).