Parallelization of commands in Bash

Recently, I was spending my Sunday afternoon playing a wargame. I will not name the game or level, since you would otherwise be able to find the solution by searching for it, and that would be against the rules. Regardless, the level I reached had a daemon running on port 30002, which required a known input and another unknown 4-digit PIN code. The level description also notes that this is a brute-forcing challenge, and the only intended solution is trying all the 10000 combinations.

Since without the correct PIN code, I don't know what the string would be for the correct solution, I've decided to just check for the non-existence of "wrong," and hope the creators didn't phrase the correct string as "Congratulations, your solution is not wrong!"

By my estimates, this would take around 6 hours. Ain't nobody got time for that, I'm on a roll here!

It was obvious that the code is in serious need of some parallelization. Since I was too lazy to write a Go script to connect using multiple threads, the first thing I tried was using xargs, since it has some parallelization capabilities, however, I was unable to get it to play nice. Instead, I started researching on whether I can somehow parallelize this operation using only bash, since the suggested alternatives all required a 3rd-party application.

I quickly came upon this answer on StackExchange on how to parallelize in batches, and modified my script loop 10,000 iterations, parallelizing batches of 32: