I wonder if you could use the long and short addresses to separate them out for programming?? Could you first set the short addresses of each one to be different and the long addresses to be the same. Maybe use the 4-digit cab number for the long address in both, then use the first 2 digits for the short address of the Soundbug and the second 2 digits for the short address of the motor decoder.
Then set CV29 to use the short address in each, program each one as required by its different short address. Then set CV29 in each back to the long address for operations where they would both respond to the long address.
Pete