There are a couple of assumptions being made - perhaps you could clarify or confirm -
Are all four entities part of the plan?
Just because they are an affiliated service group doesn't necessarily mean they are all part of the plan. Some plan documents do not automatically pull in related employers, others do, best practice is to have them all signed on as participating employers if that is the intent.
Similarly - Are you sure the W-2 compensation is eligible for deferrals?
Part of this may depend on the answer to the first question, but I would also double check the plan's definition of total compensation, and plan compensation. It could be that the compensation has to be included for plan compliance, but if it is from an entity that isn't part of the plan, it might not be eligible to defer from.
To answer your actual question - does your plan document say that contributions attributable to the payroll of a specific participating employer must come from that employer? this kind of language is fairly common on documents for MEPs, but I see it on some single employer plan documents too.
If the document doesn't say, then the plan probably doesn't care where the required contributions (Safe Harbor match) come from. That's an issue for the business CPAs to all work out when doing the deductions for the four entities.
Are you the business accountant trying to figure that part out?