The difficulty is that if you set up the group manually/programmatically, you'd need to react every time a new role was added. If its a complex role hierarchy you stand a good chance of hitting governor limits, and if there's a lot of churn you'll need to find a way to trigger the recalculation.
The way I've handled this in the past is to re-organize the hierarchy - i.e. put role 'X' at the same level as the CEO, so that when you set up your group of CEO and internal subordinates, it is naturally excluded. I then maintain record visibility through sharing rules. Obviously this doesn't work if you are relying on 'my team' type functionality for reporting purposes.
Failing that, can you set up a group that includes all the roles (but not subordinates) above role 'X' until you hit the peer level, then include the role and subordinates of all peers? You'd still have to maintain this yourself, so if there's a lot of churn it might not be practical, but it would leave the platform doing most of the work.