The following document describes the configuration for dual sim with automatic failover when the primary sim connection is lost.
http://www.cisco.com/c/en/us/td/docs/routers/access/interfaces/software/feature/guide/EHWIC-4G-LTESW.html#wp1305076
If you want to change the primary sim using EEM, you can use a combination of IPSLA and EEM applet to manually configure the primary sim.
Here is a good overview of some EEM commands.
you could potentially use "sh cell 0 sec | inc Active SIM" to determine the current active sim and then change to the opposing.
Below is an example using a GSM dual sim device. This is unvalidated and untested so test and adjust commands as needed but it should give you a start on how to change things.
ip sla 11
icmp-echo 8.8.8.8
threshold 4000
frequency 6
ip sla schedule 11 life forever start-time now
event manager applet CHECKSIM
event track 11 state down
action 01 cli command "enable"
action 02 cli command "sh cell 0 sec | inc Active SIM"
action 03 set commandresult $_cli_result
action 04 regexp "0" $commandresult
action 05 if $_regexp_result eq 1
action 06 syslog msg "Changing Primary SIM to 1"
action 07 cli command "enable"
action 08 cli command "conf t"
action 09 cli command "controller cellular 0"
action 10 cli command "gsm sim primary slot 1"
action 11 exit 0
action 12 end
action 13 regexp "1" $commandresult
action 14 if $_regexp_result eq 1
action 15 syslog msg "Changing Primary SIM to 0"
action 16 cli command "enable"
action 17 cli command "conf t"
action 18 cli command "controller cellular 0"
action 19 cli command "gsm sim primary slot 0"
action 20 exit 0
action 21 end