Firstly, UM with just 2 servers doesn’t look like a better approach. You are only avoiding 50% chance of system being down. If one UM goes down which has prime set, the entire cluster is down.
With broker, it wasn’t possible to set two broker server URL in WmOptimize package. Need to check documentation, if that is possible with UM. To start with, you can set single UM server in both these packages. UM does sync with other realms in cluster.
While you define environments in MWS, in second tab under general, you will find jndi configuration. In that place, you can specify both the UM server URL separated by comma. Check Configuring BAM PDF for more detail.