Per https://github.com/moodlehq/moodle-plugin-ci/pull/337#issuecomment-2627527871, it might be possible using `\core_component::get_component_directory` instead of `\core_component::fetch_plugintypes` reflection.