Also (and I am asking this out of ignorance, as I don't know what really happened), isn't it more logical to assume that the script simplification (supression of nuktas) did its damage, rather than "the /z/ naturally sounding like /dʒ/ to Indians"?
We are a writing society, and orthography is a very powerful driver of pronunciation.
That last point is only true extremely recently (for more see an interesting summary on Wikipedia
Spelling pronunciation - Wikipedia), before the advent of near-universal literacy (and still to this day) phonological processes have been taking place without any reference to spelling, if the speakers involved even had any concept of writing at all. In any case it usually goes the other way, with people trying to adapt their speech to the written word by adding sounds or syllables that were long ago lost in speech if they ever existed (for example pronouncing
often with a
t). One does not tend to see differences between sounds that exist in speech being lost under the influence of spellings. The Americans have no trouble flapping their
ts and it makes no difference to them that there is not a special letter for it. We do not find ourselves unsure whether to pronounce
th in English as in
think or as in
there because the orthography gives us no help on that score.
In any case, we may be a writing society, but India has a wide variety of different writing systems a very different history with writing.
What's more consider ड and ड़. Nobody is in danger of getting these two confused. There is nobody who says गाडी one moment and गाड़ी the next. We do not tend to find the
nuqtā being forgotten about here because the difference does matter to speakers. The reason why it may go astray in सब्जी is it doesn't matter to speakers.
And of course you'd then be back to the original question wouldn't you? Why did the Indians, whose writing system is actually masterfully and intricately laid out (as much as its scripts may differ from one another) and who have an astounding history of the study of phonetics decide that they should represent the sound /z/ by putting a dot under a
j ?
Also much as we might all doubt Wikipedia as a source I think you will find this article extremely informative
Hindustani phonology - Wikipedia
There are also a number of threads on this forum on similar topics. I'm sure I once found a brilliant summary of which dotted letters were distinguished which suggested that (almost) everyone distinguishes ड/ड़ and ढ/ढ़, most people can tell the difference at least between फ/फ़ and ज/ज़, and as for क/क़, ख/ख़, ग/ग़ some people distinguish them, but not many in modern Hindi. Meanwhile some only distinguish ड/ड़ and ढ/ढ़. I wish I could find it again.
Anyway notice something interesting.
F actually seems to be taking over from Sanskritic
ph in Hindi regardless of spelling, but
z is in no way replacing
j in modern Hindi, instead
j and
z alternate not because the spelling comes first but because the spoken language comes first.
As to the fact that the Persian-derived sounds are more commonly distinguished in Urdu (where to your point the script does distinguish them) I would say there's clearly a lot more to that than simple orthography. It is possible (even probable) that modern Indian education in Hindi might emphasise Sanskritic sounds and spellings whereas an education in Urdu ghazals, the Islamic faith and the Arabic language might emphasise Arabic and Persian sounds and spelling. That doubtless has an effect. I'm sure that Indian schoolchildren could be brought up in the difference between क/क़, ख/ख़, ग/ग़ and (most relevantly to us) ज/ज़ and then maybe the
nuqtā would not be forgotten about then. But once again I feel that that would be creating a difference that was not there when ज़ was chosen to represent
z, rather than reinstating a difference that was lost because ज़ was chosen to represent
z. Indeed I should think that education in English is probably a factor that sustains
z and
f among modern Hindi speakers and might have a lot to do with the reason those are often distinguished whereas क/क़ are not.
But all of these fascinating speculation is I'm sure relevant to the very disparate and diverse collection of dialects known by some (to the chagrin of others) as "Hindustani" it doesn't really say so much about the past. These sounds were introduced into India hundreds of years ago. The Nastaliq script was used for Hindustani in India for a long time. The history of literacy in India is long and complicated. The fate of /z/ in India is a topic with thousands of years of history! To assume Devanagari spelling as the primary factor in the alteration between
j and
z among even educated Hindi speakers is not something I personally would call 'more logical'.