I like this idea. However I'm not sure it covers the situation where teams are not unbalanced by numbers (e.g 10vs11) but stacked/unfair, and one good player wants to join other team to try to balance the match. The hard part is to discriminate a player that is willing to balance the match but will be forced to move back to stronger team as soon as autobalance is triggered by -2 number.
The ETL version is moving the last player in the table, and table is populated upon et_clientSpawn callback, by order of appearance so you're right laggers come last at beginning of the map.
Original version:
playerForcePutteam( playersAllied, playersAxis, playersAllied[ numPlayersAllied ], "r", "^1Axis" )
Current modified version on main server:
local randIndex = math.random(1, numPlayersAllied)
playerForcePutteam( playersAllied, playersAxis, playersAllied[ randIndex ], "r", "^1Axis" )