Of course it isn't wrong. I believe it to be incorrect, but not wrong. But for example, stoning adulterers may have been the good thing to do at the time because contraception didn't exist, so they might bring a child in to bad circumstances that may cause it to learn immoral behaviors. I don't know. It isn't my job to guess the mind of God.