The difference in kana was not recently selected in order to represent a feature of the contemporary language. It is historic!!!

I think the confusion here is in the placement of the vowels. おお and おう do sound identical when pronounced as a single unit, but the おう in 小売 (こ.うり) isn't a single unit, it's just a お that happens to be next to a う

This might be true. I’ve never thought about it deeply enough!