We have a WikiAwareEntity interface, shared by multiple classes already, and expected to be shared by more classes. We need to introduce a helper trait that would implement the interface methods. The implementation can be copied from PageIdentityValue, and the trait needs to be used in all implementing classes.
Additionally, we could introduce a deprecateInvalidCrossWikiAccess( string $deprecationVersion, $wikiId = self::LOCAL ) which would emit a nice deprecation warning if the wikiId passed doesn't match the expected wikiId. Method should be marked @internal. This will be rather useful during the transition.