Who owned the car?
There is absolutely no way to say. Yes, this sentence is ambiguous. But it's also taken out of context. It's been presented here as an example; in real life, we seldom communicate a single sentence out of context. (If we did—say, in a careless tweet—then confusion and misunderstanding might happen and the speaker would be asked to clarify.) In most real-world situations, other sentences before or after might make this one clear. And yes, even if they do, it's a good idea to rewrite this one.
There are many options for a rewrite. The simplest might be to simply replace "his" with one of the names, even if this sounds repetitive: "John killed David in David's car." This doesn't sound so bad when the sentence is longer, and repeating the noun like this can often be a good solution. E.g. "The publishers Random House and Penguin resolved their dispute on Thursday about whether Penguin's [rather than "their"] edition of 1984 was in violation of copyright."
There are probably also dozens of ways of recasting the language to avoid both ambiguity and such close repetition, perhaps working in some more details of the story that would doubtless be found in nearby sentences. Like "David was killed last night in his own car. The perpetrator, John, forced entry..."