Specify FolderId When Uploading a File on the Frontend
You can find a specific folder using the Assets service:
https://docs.craftcms.com/api/v3/craft-services-assets.html#public-methods
If you know all the necessary information when that template is parsed, the findFolder method might be useful but ensureFolderByFullPathAndVolume is probably more precise.
For example:
{{ hiddenInput( 'secret_folder_id', 
    craft.app.assets.ensureFolderByFullPathAndVolume($volumePath, $assetVolume) ) }}