I tried it and seems to work fine, even when undoing the action if there are effects on the layer (what the Docs say is problematic). However, that may just be me and maybe under different conditions, AE will still crash.
There's a workaround to use app.executeCommand() to copy the layer, then switch the viewer to the other comp, paste it, and switch the viewer back. Still, this takes a little bit of time for AE to perform whereas copyToComp() is super quick. If possible I'd rather wanna use copyToComp() but if it crashes someone else's AE, what's the point, right?
Does anyone know anything about the situation? Whoever can help, wins a free mention in a comment next to the function.^^