How to set up federation sharing without 504 errors?

I have multiple NC 18.0.3 on one Arch linux server (nginx 1.16.1, PHP 7.4.4).

I try to share a folder using federation. Although the documentation is ambiguous concerning what the requirements on nginx are and whether the modification of config.php is necessary there, too, I followed all steps.

USER-A on NC-A creates a folder FED-TEST and shares it to USER-B@NC-B.
USER-B gets notified on NC-B, and accepts it (via notification in web UI).
USER-B sees FED-TEST in NC-B and klicks on it (to view directory contents).

The issue I am facing: USER-B gets “Storage is temporarily not available”, and is thrown back to root directory. USER-A can use FED-TEST just normal.

Is this the first time you’ve seen this error?: No. I never managed to set up federation in a reliable way, since NC 12 I’s say. debian/Apache then, no difference. I NEVER managed to see one of the “federated server” entries GREEN, they are always YELLOW. Should this go green? (It does so in the above linked manual.)

NC-B’s nextcloud log:

{"reqId":"MyId","level":4,"time":"2020-04-14T00:27:00+02:00","remoteAddr":"1.2.3.4","user":"MyUser","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/MyUser/MyShare","message":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"","Code":0,"Trace":[{"file":"/WebRoot/3rdparty/sabre/dav/lib/DAV/Tree.php","line":76,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/WebRoot/3rdparty/sabre/dav/lib/DAV/Server.php","line":967,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/WebRoot/3rdparty/sabre/dav/lib/DAV/Server.php","line":1666,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/WebRoot/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":355,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/WebRoot/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array"},{"file":"/WebRoot/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->"},{"file":"/WebRoot/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/WebRoot/apps/dav/lib/Server.php","line":319,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/WebRoot/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/WebRoot/remote.php","line":165,"args":["/WebRoot/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/WebRoot/apps/dav/lib/Connector/Sabre/Directory.php","Line":225,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"18.0.3.0"}

NC-B’s config.php:

<?php
$CONFIG = array (
  'instanceid' => '###',
  'passwordsalt' => '###',
  'secret' => '###',
  'trusted_domains' => 
  array (
    0 => 'NC-A',
    1 => 'NC-B',
  ),
  'datadirectory' => '/DataRoot',
  'dbtype' => 'mysql',
  'version' => '18.0.3.0',
  'overwrite.cli.url' => 'https://NC-B',
  'dbname' => '###',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '###',
  'dbpassword' => '###',
  'installed' => true,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis.sock',
    'port' => 0,
    'dbindex' => 1,
    'timeout' => 1.5,
  ),
  'logtimezone' => 'Europe/Berlin',
  'trashbin_retention_obligation' => 'auto,90',
  'versions_retention_obligation' => '90,auto',
  'skeletondirectory' => '',
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'updater.release.channel' => 'stable',
  'theme' => '',
  'loglevel' => 4,
  'data-fingerprint' => '###',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => '###',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpport' => '25',
  'mail_smtpsecure' => 'tls',
  'mail_from_address' => '###',
  'mail_domain' => '###',
  'simpleSignUpLink.shown' => false,
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
    0 => 'admin',
    1 => '###',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
    0 => '###',
  ),
);

nginx error log:

2020/04/14 00:43:21 [error] 76627#76627: *42388 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 1.2.3.4, server: NC-B, request: "PROPFIND /remote.php/dav/files/USER-B/FED-TEST HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock", host: "NC-B"