Instead use the method that defines the plugin dir. No logic should change here. Doing this in preparation to potentially provide a way to define multiple plugin directories. But for this we first need to make sure that all code is using the same method when looking for plugin directory.
I guess this will (someday in the future) help with https://github.com/matomo-org/matomo/issues/12988 which allows easier docker images and similar things.
Yes that can help with that. It may partially help us to at some point move the plugins directory somewhere else. May goal be likely to have it later possible to add more plugins directories while leaving the core plugins in the current place. After this exercise it seems likely too difficult though and I might fallback to symlinks instead. To be seen.
Will that be an issue if the plugins are located outside of PIWIK_INCLUDE_PATH . '/plugins'?
If all plugins were moved outside then yes. For my use case I'm not really planning on the possibility to move plugins in another directory. Only to pick up non-core plugins from a different directory. The core plugins be always in that path.