Problems with Azure AD connect custom install
Solution 1:
Azure AD connect custom installer is a tough enemy to fight with. And as you truly mentioned the errors is not clear and from time to time I have a filing that MS just don't want to waste a code on that bunch of errors.
Some time ago I was tasked with the pretty same task as is you are trying to accomplish ( to sync on-premise AD and Azure, and there were more than 200k items, so I have started to dig in the direction of custom installer)
I have been digging the web and outcome was quite poor, the only this article https://www.starwindsoftware.com/blog/fighting-azure-ad-connects-custom-installer. Can be helpful for you.
Solution 2:
I just wasn’t able to login to the SQL server.
By default Azure AD Connect uses a virtual service account for the synchronization services to use. If you use a remote SQL server or use a proxy that requires authentication, you need to use a managed service account or use a service account in the domain and know the password. In those cases, enter the account to use. Make sure the user running the installation is an SA in SQL so a login for the service account can be created.
More information about service account, please refer to this link.