Basically just make sure there's no tension on the driveline during the shift. You want things to be turning, but not under stress.
So for a downshift, you basically only need to slow it down enough to take the tension off your freewheel(s), because after the shift there will be even more "slack" and you'll have to speed it up after the shift to load things back up again.
Try to be gentle about hitting the throttle again after the shift, you just want to "bump" into the freewheel and then once all the slack is gone you can ham it.
Upshifting you want to give it lots of "slack" by slowing it down enough to remain unloaded after the shift. If you don't slow it down enough, once the gear shifts and the controller detects the lower speed it will apply full(ish) power to restore speed to match throttle position.
This will put lots of strain on everything, freewheels, internal gears, chain, cassette gears, etc. So you really want it turning just fast enough to complete the shift, then as with the downshift gently bump things back into tension and off you go.
It takes practice, and modern chains and gears will take an amazing amount of abuse without slipping or even making horrible noises, but it's going to wear things out.
I don't recommend a shift sensor, it will never be able to do as good of a job as a human with some practice and an understanding of what's going on mechanically.
I have found the best shifter configuration for my BBS02 bike to be a grip shifter on the left bar with thumb throttle on the right, with this I can coordinate things very well and shifting becomes second nature. I can do it very quickly without mashing up any parts.