I would do the track in Mocha so you can ignore the bag in front. You can also do the roto in Mocha.
Another option would be to stabilize the shot for position rotation and scale then roto the bag in front to separate the shot into layers, then replace the logo and animate as well as you can to match, then remove the stabilization and add the motion to the logo replacement. The easiest technique depends on what is happening in the shot. Just a simple corner pin track isn't going to work very well because there is very little texture on the bag.
There are lots of tracking tutorials on the Imagineer site. I'm working on a tutorial for stabilizing, roto, then put the motion back tutorial that would cover the entire procedure. It should be ready soon. I'll put it up when it's ready. It involves stabilizing the shot so the object of interest does not move in the frame. Renaming the stabilized footage stabilized, doing any roto needed, adding in the new elements and adjusting them as needed, then adding a null and applying this animation preset to the null, then parenting all of the layers to the null to remove the stabilization and add the motion to the added elements.
Thanks Rick. I took your second option of stabilizing the shot for position rotation and scale and then masked the bag on top. Worked just fine.
I think Rick's first suggestion (doing it in mocha) is usually the best and most accurate way to do it.
In this live webinar recording I show how to do this in mocha (the relevant part starts at about 18:40).
The best method depends on the shot. I do about 80% of my shots like the one you described by stabilizing in AE and then doing a hand roto. It's very quick and easy to do on many shots and takes me much less time than doing the same shot in Mocha. On other shots Mocha is the best tool. The point of the whole discussion is that there are many ways to do the same task when you are compositing. The best tool and the best workflow depends entirely on the shot. No one solution is best all of the time.