The full solution for me therefore was as follows.
It is heavily borrowed from this post and assuming Fish shell, as I much prefer scripting in that:
sudo -s
cd /var/www/pelican
# Make sure the whole Pelican home / work directory is owned by group `pelican`
chown --recursive pelican:pelican .
# Add `nextcloud` and `www-data` users to the group `pelican`
usermod --append --groups pelican nextcloud
usermod --append --groups pelican www-data
# Force all (sub)folders created by Nextcloud to inherit the group `pelican`
chmod g+s content
# Authorise users `nextcloud` (and `www-data`) to write in `content/` folder
chmod 770 content # a.k.a. ug+rwx
chmod --recursive 660 content/* # a.k.a. ug+rw
for folder in (find content/ -type d) # find all (sub)folders within `content/`
chmod 770 $folder # a.k.a. ug+rwx
end
# Restart nginx (only needed the first time)
systemctl restart nginx
# Restart PHP (only needed the first time)
systemctl restart php8.2-fpm
NB: php8.2-fpm
could be of different version on your machine.