So do I understand correctly that if a man who was never baptised commits murder, then gets baptised, he never has to confess the murder?
That's correct, he does not need to confess that sin or any sin committed prior to being baptized in order to be forgiven of it.
Trent's Catechism teaches:
All Sins That Precede BaptismWhen we first make a profession of faith and are cleansed in holy Baptism, we receive this pardon entire and unqualified; so that no sin, original or actual, of commission or omission, remains to be expiated, no punishment to be endured. The grace of Baptism, however, does not give exemption from all the infirmities of nature. On the contrary, contending, as each of us has to contend, against the motions of concupiscence, which ever tempts us to the commission of sin, there is scarcely one to be found among us, who opposes so vigorous a resistance to its assaults, or who guards his salvation so vigilantly, as to escape all wounds.
The Council of Trent teaches:
"For, *in* those who are born again, there is nothing that God hates; because, there is no condemnation to those who are truly buried together with Christ by baptism into death; who walk not according to the flesh, but, putting off the old man, and putting on the new who is created according to God, are made innocent, immaculate, pure, harmless, and beloved of God, heirs indeed of God, but joint heirs with Christ; so that there is nothing whatever to retard their entrance into heaven."