Dear Sister,
Salamun Alaikum.
Please don't be troubled. You have the Quran with you and a God gifted mind. If their explanations do not make sense to you then you are under no obligation to accept them.
Before I answer your question with regards verses 4:23-24, I do agree with you on a fundamental point.
HUMAN NATURE
The Quran makes it clear that God has innately infused in humans the knowledge of what is right or wrong and given them the 'balance'.
091.007
"And the Soul, and (He) who proportioned it (gave it proportion, balance and order - Arabic: sawwaha)"
091.008
And inspired it (with conscience of) what is wrong for it and (what is) right for it.
Human souls are inherently cognizant of right and wrong, an internal barometer which understands balance. Yet by volition it can be corrupted and often to an extent where the ability to distinguish between the two becomes severely compromised.
091:009-10
"Indeed, he succeeds who purifies it and indeed, he fails who buries / corrupts it"
If the Arabs knew innately what they were doing was correct (regardless of their actions), they would never have listened to the Quran's guidance. Why would they? For them the Quran would have simply preached falsehood.
It was because the Quran appealed to their inner 'sawwa' (level, form, balance), the mould in which God created man, that is why over time, they could understand what they did was in fact wrong and abolish certain traditions.
This is no different from the transgressors in Lot's time that knew what they were doing was wrong but yet said "...Drive them out of your city: these are indeed men who want to be clean and pure!" (7:82). They remained arrogant and persistent in their transgressions, despite knowing it was wrong. (Against their nature in which God framed humans)
So yes, I agree with you. There are 'human codings' as you say, which I like to call 'an internal barometer' (sawwa) that has been instilled in us (our nature) which gives us the ability to make a 'judgment'.
GRANDPARENTS
Clearly the Quran wants to prohibit any association by marriage where there is already a direct biological relationship which is further clarified by the Arabic in verse 4:23 and sentiment, "alladhina min aslabikum" (those from your loins, i.e. biological offspring). For example, how could one conceive to marry their granddaughter, if they were simply prohibited to marry their son's wife on the grounds that their son was biologically related? (4:23)
004:023
"...and the wives of your sons who (spring) from your own loins..."
Furthermore, when the Quran uses the phrase 'abaukum' especially with the masculine plural pronoun 'kum' in this way, it not only implies father(s) but also grandfather(s). i.e. their forefathers by biological lineage.
For example, if we read verse 6:91, the 'abaukum' means not only fathers, but also forefathers in lineage. The same word 'abaukum' has been used in verse 4:22 where the reference is not only to 'fathers' but also 'forefathers'. In the same way when the Quran speaks with Prophet Joseph, it references 'forefathers' in particular such as Abraham and Isaac (as grandfather and great grandfather of Prophet Joseph) by the dual 'abawayka'. The 'aba' is still the common word for a father / forefathers but now addressed specifically in the singular to Prophet Joseph (by the pronoun 'ka').
In the same way when 'ummahatukum' is used in 4:23 with the plural pronoun 'kum', it not only captures all the addressee's mothers, but also grandmothers or those related in direct lineage indefinitely (if alive).
The same is true for 'daughters'. Even in many languages today, grandparents refer to their granddaughters as 'daughters'.
I hope that helps, God willing.
Joseph.