As you noticed, simply having the spouse trait/class does not allow you to have a child with the Heir type. This is because there is a spouse variable which is assigned a character's ID (Identification) when completing the marriage event. This variable is what dictates if the character may produce children with Heir type and unfortunately isn't connected the spouse trait/class. You may change the spouse variable to another character's ID so the new character may birth Heirs however the variable doesn't take a list of IDs therefore may not have multiple spouses that produce Heirs at the same time.
=Direction to changing Spouse Variable=
1.) Open desired .sav in save file location
File location on Windows: \AppData\Roaming\Strive for Power 2\saves
Online Save Editor: https://www.saveeditonline.com/
2.) When opened, use search (CTRL + F) to find desired character's ID using the keyword below
Search Keyword: "name":"[CHARACTER'S NAME]",
Replace [CHARACTER'S NAME] with the character's full name (Unique Character example : "name":"Daisy",) (Created Character example: "name":"Chelsea Gracewood",)
3.) A few results may show up, look for one with the Key Phrase below being on the left and where # are numbers:
Key Phrase: "id":"hid##########"
This is your ID for this character.
4.) Now search for the Keyword below and replace the ID there with the desired character's ID.
Search Keyword: "spouse":"hid