The trick is that you'd need to use a data element to populate the Google Analytics account ID, however it isn't possible in DTM (by default). You could write a work around to allow DTM to use a data element. Then you'd write some custom code in the data element to have it return the correct account ID.
Another option would be to add multiple Google Analytics tools and in the custom code you can "return false" if the domain doesn't match the correct URL. Not ideal, but it is a solution.