An accused murderer's texts to his ex-partner weeks before her death undermine allegations he badly beat her with the intention of ending her life, a court has been told.