@eranglr Would be beneficial to see what you have built and what you use it for, perhaps then people could suggest alternate paths for you to follow or help investigate.
Sounds like you are after variable speed control ? on the fly ?
That right. Once you've send the command to add the SSID and password once it gets stored in the wifi module itself. No need to send it again. M552 S1 enables networking and the wifi module will connect to the first available SSID with the best signal strenght.