Piwiki Load-Balanced - which folders to be shared/Question about bootstrap.php


up to now, we are using Piwiki 2.16.1 in a load-balanced environment, i.e., two servers use a shared Piwik installation residing on an NFS share – which is quite slow.
We have database session storage but we’d like to install Piwiks files in local storage and place only the minimum number of files and folders (imho the config and tmp folder) on the NFS share.
My first thought was to use a bootstrap.php (according to the documentation at Include & Customize Piwik for your Project - Analytics Platform - Matomo) with the following content:

define('PIWIK_USER_PATH', '/shared-nfs/piwik/piwik-user');

In the folder /shared-nfs/piwik/piwik-user config and tmp folder are present.
However, during installation Piwik complains that it cannot find a number of files that are typically located in Piwik’s web root (e.g. twig files), indicating that Piwik’s install routine does not separate its document root path from the piwik user data path and following the php instructions in index.php:

if (!defined('PIWIK_INCLUDE_PATH')) {

Changing the bootstrap.php’s content to the following did not help either:

define('PIWIK_DOCUMENT_ROOT', '/opt/piwik/current');
define('PIWIK_USER_PATH', '/shared-nfs/piwik/piwik-user');

Any help in getting seperating Piwik’s document root from the shared config and tmp folder is really appreciated.

Kind regards,