Done this, and several variations, many times. BA are fully aware of this, and generally check your onwards travel documents, other times seem happy for you to just say "I've got a connecting flight". BA - certainly at London - are very much familiar with this very handy arrangement for CTU, PVG and PEK. And HKG is specifically fine as the onward travel point too. Allow 5 minutes extra on what you would allow for HKG direct.