There are 2 ways you can batch upload sub galleries via FTP and automatically assign passwords to those sub galleries.
Password file in each folder
You can create a password.txt file that contains the sub gallery password in each sub folder you upload. If a password.txt file exists, it will use the contents of that file as the password for the sub gallery.
The password.txt file must be all lower case.
Passwords in a CSV file
See this article on adding passwords with a CSV file.