Looks great Ken.
I did not understand anything about the custom domain part. Could you please share about it a bit more?
I have done a similar thing but with Caprover, where the app has a duplicate deployment for each separate subdomain or external domain.