Ancient texts are fine. Great fun, so long as they are treated as ancient texts.
I don't think that anybody is distressed by the Code of Hammurabi, but that is because there are not people going around sincerely stating that they believe the Code of Hammurabi to be timeless and perfectly just, and Hammurabi himself to be someone to look to for ethical or moral guidance.
It is only when the historical context of ancient documents is purposely ignored or denied that those ancient documents become the targets of modern criticism.
I don't think that anybody is distressed by the Code of Hammurabi, but that is because there are not people going around sincerely stating that they believe the Code of Hammurabi to be timeless and perfectly just, and Hammurabi himself to be someone to look to for ethical or moral guidance.
It is only when the historical context of ancient documents is purposely ignored or denied that those ancient documents become the targets of modern criticism.