I’m not an expert here either, but I am not sure it works out that way in practice. Medicaid recipients also include (IIRC) elderly people who have depleted their savings due to long term care costs (aka nursing homes and assisted living facilities), and some subset of people receiving disability benefits, both groups that are likely to have high health care costs.
Also, in recent years the with the surge in people on Medicaid as a result of the ACA, there may have been/may be a surge in people making up for years of not getting needed care, raising current costs? Not sure if that has actually happened.
When medical costs are a common cause of bankruptcy, the gap between “program for the poor” and “program for the sick” becomes less clear, I think.