Assuming we could avoid the legacy leverage, would it be possible to build or use an already existing package manager to perform this, wrapping all specific logic for each language?
The human element is important imo. I don't think automating it away is wise. However, many distros have tools for speeding the work for particular languages.