How does WordPress process plugin installations?

OK, so I think I got everything that is needed. So yes, you could work with a combination of:

  1. plugins_api
  2. install_plugin_install_status
  3. install from an instance of Plugin_Upgrader

This may seem elaborate but you can actually see from the WP-CLI project that it is quite straight-forward. Of course, you can just install that excellent plugin and be done with it if you can also get access to a remote terminal session.