The Bible tells us that David was punished for his sin, but the point of the story was to show Davids willingness to accept this punishment, that he was not above the Law. Nathan foretold what would happen and so it did, and David accepted the judgement of his sovereign Lord.
Yes. God killed the child to punish David for his infidelity. So there were two punishments. Firstly, God killed an innocent party (the new born son) and used that death to punish a guilty one (David) for his infidelity.
However you paint this, it still seems apparent that the idea that God never punishes the innocent is incorrect, right?