Yes that is correct as share sales are not covered under TUPE. It is a complex situaiotn to be honest as there is no specific or definitive confirmation as to who your employer should have been to start with. If you were employed by XXX for 5 years and this was not picked up, yet just before a potential sale they say you should have been working for YYY, that can be suspicious as it may suggest they were looking for a reason to remove you from the business.
The ain difficulty is that I cannot in any definitive terms state who you should have been employed by – that depends on various factors, some going back to the start and only a court or Employment Tribunal can determine if it should have been XXX, YYY or even both.
The other issue is that to challenge them you may have to refuse to move over to the new employer and resign and claim constructive dismissal, which could be the only way to make a claim. I suggest you approach the employer first, express your concerns about the timing of all of this and make it clear that legal action could follow if they do not resolve this.
It is also worth mentioning that there is a possible alternative solution to this, which could avoid the need for legal action. That is where the employer is approached on a 'without prejudice' basis (i.e. off the record and with protection against these discussions being brought up in future legal proceedings) to try and discuss the possibility of leaving under a settlement agreement. This can be done by asking for a meeting, or it can be done in writing, via letter or email. Under a settlement agreement the employee gets compensated for leaving the company with no fuss and in return promises not to make any claims against the employer in the future. It is essentially a clean break, where both parties move on without the need for going to the Employment Tribunal. However, it is an entirely voluntary process and the employer does not have to participate in such negotiations or agree to anything. There is nothing to lose by approaching this subject with the employer and testing the waters on this possibility - the worst outcome is they say no, whereas if successful it can mean being allowed to leave in accordance with any pre-agreed terms, such as with compensation and an agreed reference.