It was not allowed by God to David or
Solomon that's why God punished them.
God does not allow polygamy, he does not allow polygamy. To David, To solomon? That's why they were punished because it is not allowed by God. But it's within their power as a king. They can easily get wives. It was not allowed by God that's why David was punished. The child died which is the fruit of his fornication. Now, solomon also was hated by God in the latter part of his life because he abused his power as king.
1 kings 11 verse 3 says, And he had seven hundred wives, princesses, and there hundred concubines, and his wives turned away his heart.
And God was angry with solomon because of those acts that he have done. You see, it is not allowed, but men can choose for themselves because we are given the power to choose.
Deuternomy 30 verse 19 says, I call heaven and earth to record this day.
Polygamy is not allowed by God. So has a child of God you shouldn't involve yourself in that act. A Christian should not marry more than a wive so as to live a peaceful life and live a life that please God.