Acrobat Pro does allow you to password protect PDFs and also has a command-line interface (CLI). From memory, you should be able use either the command-line for Acrobat to password protect a document on a server (windows server only).
There are also tools like AEM Forms / Livecycle that can create workflows / watched folders to do this, but its very expensive option just to password protect PDFs. I would look into the free/cheap PDF API tools out there (CutePDF / pdfgeneratorapi) which should also be able to add a password into a PDF as its part of the standard.