The only problem with the solution of disinheriting firstborn daughters that get married regularly for a good alliance is that the children of the 'disinherited' daughter are ahead, in the line of succession, of the other siblings. I wish I could say BAM here's a solution to this but I honestly don't know.
ie:
The heir/daughter of A is B and C is B's sister, but B then gets married regularly and gets disinherited and gives birth to D. D is now A's heir and C is a pretender.
ie:
The heir/daughter of A is B and C is B's sister, but B then gets married regularly and gets disinherited and gives birth to D. D is now A's heir and C is a pretender.