Cannot upload a file to external storage (Owncloud / webdav)

If I mount external storage (owncloud),
I can successfully access the files in the mounted folder,
but I cannot upload or create any files. Surprisingly, I can create (empty) directories.
I tried 3 different such storages, mounted them both as “nextcloud” storage and as “webdav” storage, the result is the same: No file is created and I receive an error similar to this one:
Server error response [url] https://owncloud.tld/owncloud/remote.php/webdav//documents/filename.txt.ocTransferId420584600.part [status code] 500 [reason phrase] Internal Server Error
sometimes it is also error 503 (service unavailable)

the error message in the log of my nextcloud looks mostly like this:
Sabre\DAV\Exception: Server error response [url] https://owncloud.tld/owncloud/remote.php/webdav//documents/filename.txt.ocTransferId420584600.part [status code] 500 [reason phrase] Internal Server Error

/var/www/nextcloud/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 188: OCA\DAV\Connector\Sabre\File->convertToSabreException(Object(GuzzleHttp\Exception\ServerException))
/var/www/nextcloud/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 151: OCA\DAV\Connector\Sabre\File->put(Resource id #15)
/var/www/nextcloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: OCA\DAV\Connector\Sabre\Directory->createFile('filename.txt', Resource id #15)
/var/www/nextcloud/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile('mountpointname...', Resource id #15, NULL)
[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/nextcloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
/var/www/nextcloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
/var/www/nextcloud/nextcloud/remote.php - line 164: require_once('/var/www/nextcl...')
{main}

On the other end (the external owncloud server), I see
{“app”:“PHP”,“message”:“fopen(/owncloud/data/user/files/documents/filename.txt.ocTransferId420584600.part): failed to open stream: No such file or directory at /usr/share/owncloud/lib/private/files/storage/local.php#202”,“level”:3,“time”:“2018-05-29T21:50:33+02:00”}
{“app”:“PHP”,“message”:“fopen(/owncloud/data/user/files/documents/filename.txt.ocTransferId420584600.part): failed to open stream: No such file or directory at /usr/share/owncloud/lib/private/files/storage/local.php#202”,“level”:3,“time”:“2018-05-29T21:50:33+02:00”}
{“app”:“PHP”,“message”:“Call to a member function getEtag() on a non-object at /usr/share/owncloud/lib/private/connector/sabre/file.php#138”,“level”:3,“time”:“2018-05-29T21:50:34+02:00”}
{“app”:“PHP”,“message”:“Undefined index: fileid at /usr/share/owncloud/lib/private/files/fileinfo.php#90”,“level”:3,“time”:“2018-05-29T21:50:34+02:00”}
{“app”:“PHP”,“message”:“Undefined index: fileid at /usr/share/owncloud/lib/private/files/fileinfo.php#90”,“level”:3,“time”:“2018-05-29T21:50:34+02:00”}

This three things (error, log message on my side, log message from external server) belong to the same attempt. I can provide more logs if needed, e.g. for the other two servers (however, there don’t have access to the logs of the external servers).

I have a feeling that my nextcloud servers tries to store the file somewhere but fails to do it. Then, it sends nothing to the external server and when trying to assemble the file, those servers then reply 500 or 503. However, I have no idea where to look. I don’t even know what tmp directory should exist and be writtable.

One thing to mention, I have encryption app enabled, but the encryption for the mentioned external storages is switched off (but I would like to switch it on, once it works).
Local external storages (directories on the local FS) work well, even if I try to switch on the nextcloud server-side encryption.

thanks for any help.