First and foremost, it needs to be understood that Jesus Christ, being God in the flesh, took the punishment of sin upon Himself. The Godhead paid off our infinite debt of sin so that we did not have to suffer eternal condemnation. Our problem is that we have sinned against God, who is holy. So He as a result of His love enabled a means of redemption through the shed blood of His Son Jesus Christ.
Jesus, knowingly and willingly, took on human flesh to make atonement for our sins (John 10:17-18). He died to make reparation for our sins and to bring glory to the Triune God. The members of the Trinity worked together as one to bring about our salvation. So, the claim that penal substitution is cosmic child abuse is a false analogy by its very nature. Our forgiveness came at a great expense: the death of God the Son. He was raised bodily from the grave to bring about our justification (Romans 5:18-19).
If God does not punish the ungodly, then He cannot simply be regarded as morally right and fair. He would be compromising His holiness if He left evil to its own device. Sin results in judgement, and there is no reason for God not to do so (Ezekiel 18). If God has love for the ungodly, then it follows that there must also be a way for Him to satisfy His justice. There has to be grounds on which God can forgive us. Love is not a weakness in God's character. Neither is mercy incompatible with vengeance and judgement. Jesus Christ, being without sin, was qualified in every way to bear the punishment and guilt of sin on our behalf. The court room language has a considerable connection with Christ's atoning sacrifice, but does not fit every element of His atoning work.