This is not really fully possible today. It is effectively what part (2) of
https://github.com/pulumi/pulumi/issues/4133 is tracking.
The best way to handle it today is to do some form of manual serialization and deserialization on your component, and then export the serialized data and use that to deserialize into your other stack.