That sounds much more complicated than the method via
sudo -u www-data php /var/www/nextcloud/updater/updater.phar
And with updater.phar it was working for years.
Also in the past, i always had to update to the last bugfix version, in this case 26.0.6, before i was able to upgrade to the next major version.
Why is this broken now?