Your desktop keyboard replaces “x” with “ọ”, so that when you type the “x” key, you actually get an “ọ” character. You then use the “]” key as a means to get an actual “x” character by typing the “]” key followed by the “x” key. (The “]” key is actually producing a “]” character, so it’s not technically a deadkey, but you’re using the combination of the two characters in the same way that a deadkey would work.)
For your mobile keyboard, you have put the “x” character as a longpress key on the “ọ” key (which is in the position that “x” would be on a QWERTY keyboard). That is a reasonable place to put this character (which I assume is not used in Obolo, except for English loanwords). Therefore, you don’t really need to duplicate the way that the desktop keyboard produces the “x”.
As to your question, I’m not sure exactly what interaction isn’t working the way you intend, but here’s what I tried. Since you really only need one deadkey (that is, you don’t need to treat the key you’re using as a deadkey differently for the default, shift and caps layers), I changed your three rules to all generate dk(1). Then I changed the three rules producing “x” or “X” to all use dk(1). This seemed to work for those cases. So, if you want to keep the deadkey on your touch layout, this is the approach I’d suggest.