This solution would be to service accounts what LAPS is to local administrator accounts of domain-joined machines
It periodically generates random and complex passwords for the domain service accounts and stores them in the DC
A domain account can retrieve the password for a gMSA if it has the appropiated permissions over the latter, which can be known by listing its msDS-GroupMSAMembership attribute, whose value it’s a Security Descriptor