If your server is running Linux you could run Termux on your phone and copy the files to the server via SCP. You could do it periodically with a script or you could run the command one time before you were going to travel across a suspect border.
Termux has the added advantage of being a generic app, without any specific purpose. There could be a situation where you don't want to have a 'Photo Downloader and Hider 9000' app on your phone.
If you just want something akin to iCloud/Google Photos, Immich is a good project to get started with.