Really funny! I worked on an exact same scenario yesterday. Just look at my reviewer fields in this post:
https://community.aras.com/f/development/36437/what-is-the-easiest-way-to-show-a-placeholder-when-an-item-selector-is-empty
I also thought about make this one reusable, cause I already have three similar Methods. But in my case all my CM processes have their special scnearious, so I sticked to the copy&paste version.
In my case the line of code with your "identId" looks like this:
assignment.setProperty("voting_weight", (100 / reviewers.Count + 1).ToString());
"reviewers" in my case is a list that contains my reviewers. I use some extra code (hashset) to avoid people assign themselves multiple times to speed up the progress. It´s based on the available reviewer fields in the form. Do you always have the same amount of reviewers or do they change? Then you can just use a static value in side the method.
You basically have to count your reviewer fields to calculate the voting_weight. But you can also make this one dynamic based on your Team roles.