In principle, libraries for Joomla are a useful feature. Unfortunately, in practice they have problems stemming from the way Joomla upgrades them. Some aspects of the problems are described at https://issues.joomla.org/tracker/joomla-cms/35083. There is no sign of this issue being resolved.
In fact, the issue appears to be rather worse than described. Because Joomla handles a library upgrade by uninstalling and then installing the library, it becomes extremely difficult to implement an install script. The trouble is that the install script is loaded for the uninstall of the library, but is then loaded again (from a different place, so not recognised by PHP as being the same) for the install of the library. That results in a PHP compile error because the install script is a duplicate class the second time round.
It is possible in a rather messy way to avoid the install script being loaded the first time, but this approach will then result in failure to run the script if Joomla ever resolves the issue.
The issue report linked above suggests that an alternative is to use a "file" extension instead of a library. But file extensions are even less documented than libraries. The description at https://docs.joomla.org/Extension_types_(general_definitions) is sketchy to say the least.
Is there any information available on how to install a set of files? How to determine where they go? Is there a way to autoload classes in the set of files? Can "files" extensions have language files? Is a "files" extension really a viable alternative to a library?