Is the construction "the names of them" used in the sense "their names" totally ungrammatical? Is it acceptable in dialects?
"The names of them" is certainly grammatical, just somewhat more awkward than "their names".
I met so many people at the party, I can't remember the names of them all.
I met so many people at the party, I can't remember all their names.
As with many things in English, the order of words can change the emphasis. Without any additional inflection, the first sentence slightly emphasizes names, while the second slightly emphasizes their.
Because it's difficult to fit into a sentence, I would avoid using "the names of them" unless I had a really good reason.