When I was developing a plug-in for server software for Minecraft BE called Nukkit, I faced the problem of how to download the prerequisite plug-in when distributing the plug-in.
The idea was to list the prerequisite plugins on GitHub and download them from the plugins you distribute.
I actually tried it, so I hope you can read it as an experience story.
I created a GitHub repository and prepared a Json file called doc.json there. Information on each library is described here.
Prerequisite plugins are listed in the repository in advance.
Get this Json from the raw content URL like "https://raw.githubusercontent.com/" from the plugin side and load it.
Then search for the name of the prerequisite plugin you want to install in the repository section and get the download URL from the url section.
Based on that, I took the flow of downloading and activating the prerequisite plug-in.