Hello there,
This thread contains Powershell script to download documents and save as serial number https://social.technet.microsoft.com/Forums/en-US/009abf5d-126b-42fa-9a36-90fbc0b53039/powershell-to-download-documents-and-save-as-serial-number?forum=sharepointadmin
For the auto download of files, you can use the task scheduler and trigger this activity.
The Task Scheduler enables you to automatically perform routine tasks on a chosen computer. The Task Scheduler does so by monitoring whatever criteria you choose (referred to as triggers) and then executing the tasks when those criteria are met. https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–