Hi! To turn stomps/effects on or off, you have to use Control Changes in your midi track.
CC#17--20 = stomps A--D
CC#22 = X
CC#24 = Mod
CC#27 = Delay
CC#29 = Reverb
Setting the CC to zero turns the stomp/effect slot off, setting it to any other value (1--127) turns it on. I'm not familiar with Cakewalk Sonar, unfortunately, so I don't know how it works for CCs.
Now for your more specific question: keeping the transpose effect on for an entire song, while changing rigs. You could do different things.
* You could program your MIDI track to turn the transpose effect on every time you change rigs, but that seems risky (you would have to time it precisely so that the rig is changed before the effect is turned on, but it has to be quick enough so you don't hear it...).
* You could lock the slot where you put the transpose effect. That way it becomes "global", completely independent of rig changes, as if you had a separate transpose stomp box next to your Kemper. You can turn it on and off independently (using CCs or your pedalboard), and even if you change to another rig, it will stay the way you set it.
The disadvantage is that if you want to use that slot for other effects in other songs, you'd have to unlock it again during the set. Locking/unlocking is not something you can easily do via MIDI.
* You could make a copy of your Rig "Crunch" and your Rig "Clean" for that specific song, and store them with the transpose effect already ON. That way, the moment you switch to those rigs, you'll already be in the right key. The Kemper has room for hundreds of rigs so you could even make specific rigs for every song (especially since it will all be automated so you don't have to remember which foot switch to press!).
Oh and your advance question! Yes, switching to another rig via your pedalboard will kill the transpose effect (unless you switch to a rig that also has a transpose effect set to ON, of course). The only way to prevent this is by locking the transpose slot.