It is really hard to see in that picture and depending on the method used to seal your rig may be different.
However, most campers are sealed with a sealant similar to Pro-flex RV.
Some campers (and from what I understand are a minority) will have butyl tape between the metal and the exterior wall. You'd need to remove the trim and scrape out the old stuff prior to putilting down the new sealant (it's similar to a rope caulk) and will squeeze out as you are tightening down the trim.
The slightly tacky substance you describe may be Butyl tape. A sealant similar to Pro-flex wouldn't typically be tacky in any way.
If it's not too bad (and I don't think it is based on what I can see from your photo) I'd be tempted to just clean it up a bit by removing the loose or cracked stuff and putting down a small bead of Pro-flex. I wouldn't remove the trim unless it had completely failed.