Went ahead and tried to see what would happen. Effectively, doing the afore-mentioned commands deleted domainB entirely. That is, db domains show, depicted only domainA alone (even though I had set domainB as SystemPrimaryDomain).
For some reason though, this change did not affect DKIM for domainB. That is, even though it was not listed with db domains show, sent mail was succesfully signed with the DKIM key. Which is somewhat logical, since both domains share the same DKIM key...
At this point I am not sure whether I should open a bug: the reason is that I am not sure, in turn, if the following should have done what I intended in the first place:
db domains delprop domainA SystemPrimaryDomain
db domains setprop domainB SystemPrimaryDomain yes
signal-event post-upgrade; signal-event reboot
Any advice will be appreciated.