Object ID & aliasing & usage within comp program

This should work fine, it depends how your scene is set. Generally it will be best if you could render the object on a black background(BG) so the AA doesn’t get affected by it.
Also this workflow should work correctly if the background is the same on the image your are trying to comp and on the original one.
Furthermore make sure you render linearly.
Feel free to upload a simple example scene and we will have a look.