You might want to take a look at this, to brainstorm:
…and yes, you can update the lookup transform via API (e.g. PowerShell SDK)…but you’ll need somewhere to store the script, the DB credential, the PAT and run the script.
Create Transform API:
Update Transform API: