When the heir inherits, they'll remain in control of any lands that are de jure a part of that title, even if a lower rank title passes to one of their siblings. Your highest rank will always be your character's Primary title, and it will always pass to their heir. Lastly, if you're a King who has formed multiple Kingdoms, you'll want to create an Empire. If you're a Duke who controls multiple Duchies, you'll want to form a Kingdom. In that case, you'll want to form a Duchy. So, suppose you're a Count who holds several Counties.
The way to prevent loss of land under Confederate Partition is to form a domain that will give you a rank superior to any other titles under your control.