I think the OP is confused about Medicaid. Employment is not required for Medicaid and, in fact, employment that includes medical insurance benefits would preempt Medicaid being a primary insurance.
If the health insurance that all employees got at the hypothetical company was much better and/or less expensive than Medicaid or the family members somehow did not qualify for Medicaid, then this scheme might help them.
If implemented, this would cost the company since the company insurance will charge by the head. There is a company cost per person and might also be a cost for the employee.
Is it legal or ethical? The no-show employee will hurt the company fiances by their salary + ss, and other payroll taxes + the company side of the insurance premium.
If the company is a sole proprietorship and that owner is the one knowingly putting this plan into place and there are no investors or others who have a call on the profits then it might be that no-one is getting cheated.
If their are partners, shareholders, etc., they are getting money taken out of their pockets.
Last the insurance company - they have assumptions built into their underwriting. One may be that anyone employed is healthy enough to do some baseline job. Your bedridden great grandfather might not be that healthy. It is possible that they have recourse in their contract with the company to cover this case.