For an experiment, I tried staying peaceful and waiting for a holy war to amass piety. I was Venice and had 1 county with a 6 size.
I thought it was going well - I had almost 500 piety and I had plenty of children (about 7), and an heir. All of a sudden I die and suddenly my son is just a patrician of one holding only, and with a liege. All my piety and prestige is gone!
What did I do wrong? Note that I can't replay as I am in ironman mode. The law is republic but I don't think it was before... Oops, now the game is over, we lost an invasion war and I received the message "You have become the head of as republic and are therefore no longer allowed to continue playing."