Unfortunately unlike rpm's, slapt-get doesn't have any way to run scripts upon removing packages. It keeps a list of files and symbolic links that were installed. Then it deletes those listed items when a package is removed. Nothing more.
Not sure how it works, but I "think" if you made a fcitx.sh file and placed it in /etc/profile.d it would be executed on boot. I could be wrong. ANYONE?
If this is possible, I'd make it like this:
# For fcitx
I'd have this in your sources with your SlackBuild.
Then somewhere in your script I'd do something like this:
mkdir -p $PKG/etc/profile.d
cp $CWD/fcitx.sh $PKG/etc/profile.d/fcitx.sh
chmod +x $PKG/etc/profile.d/fcitx.sh
I would then remove all the code you've done with doinst.sh
This way when the package is removed. Our fcitx.sh file will be on the list and it will be removed cleanly as well.
But please make sure it will work having the .sh file in /etc/profile.d first before taking my idea as "the gospel"