You don’t house arrest dictators. They would either be imprisoned or assassinated.
China often imposes a "house arrest" on political dissidents. This is a way to make it appear the person is not being imprisoned, while still restricting their freedoms, and being able to monitor their communications with others (so these people can be "kept in line").
I don't think there is any kind of Coup going on in China right now, as this is not being reported by any reputable news sources. However, if this were happening, I think Xi being under "house arrest" would likely be a first step.
I also know that Xi has a very tight grip on the CCP and the Chinese government. His loyalists are in positions of authority.