BATTLESPERBOT setting
I think the best is to dynamically adjsut the value based on current battles per bot, e.g. 80% * pct1 of battles per bot. In the meanwhile, you can safely set this value lower than the second lowest battle counts.
If I recall correctly, even if all bots have more than BATTLESPERBOT battles, bots with less battles get some priority. An other priority is 'old' battles (where f.e. the last battle is from 2020) even if those bots have a lot of battles. Also if I recall correctly, in melee there is some protection to prevent battles between only 'new' bots, I think only 1 new bot per battle and the rest quite randomly. Setting the BATTLESPERBOT higher does not influence this. Ofcourse bots with incomplete battles always get the highest priority.