To merge your libraries in iCloud you would just have to make all your additional historical libraries your current iCloud Photos Libraries in turn.
Whenever we make an additional Photos Library our system Photos Library and enable iCloud Photo for it, the photos ans albums from this library will be uploaded into our current iCloud Photos Library and the albums, folders, media items will be merged into the existing library. iCloud will check for duplicates and solve conflicts between existing duplicates.
The merged library will sync back from iCloud into your currently open Photos Library.
This procedure should give you the result you want. But I strongly recommend to make backup copies of all your libraries, before you merge them, just in case something should go wrong and you may need to revert to the previous state. And it will be a very slow procedure, as the merging into the existing library will take a long time.
The only thing missing after you merge the libraries in iCloud will be your projects, as iCloud Photos does not sync projects between your devices.