Where will I find the scriptures that define YHWH to be the capricious god you describe here?
I don't think "capricious" is the right word.
The God of Abraham, Isaac, Israel, and Jesus Christ is a forgiving and merciful God.
Hebrews 9:27 Just as people are destined to die once, and after that to face judgment, 28 so Christ was sacrificed once to take away the sins of many; and he will appear a second time, not to bear sin, but to bring salvation to those who are waiting for him.
The only people enforcing that rule in Deut 23 were the Israelites. If they didn't enforce it, it wasn't enforced.