Yes, plans use W-2 wages.
To clarify, Company X, "the partnership" - is an actual partnership filing a form 1065 partnership return? And there are only two partners of this partnership, Companies A and B, both of which are S corps? And X issues just two K-1s, one to each S-corp. Correct?
It's not clear why one of the S-corp shareholders (the individuals are not technically the partners in X, their corps are the partners) is also getting a W-2 from the partnership, this seems like a needless complication and a good way to increase payroll tax costs. But since it is an ASG, the group of companies are considered a single employer, so yes I'd combine the W-2 amounts for plan compensation assuming all entities have adopted the plan.
Answers could change if the facts change.