> as an American a sentence like "Whom did you invite to the party?" sounds a bit stilted and formal to me
It would be fair to call this ungrammatical in American English.
But whom does survive in fronted prepositional phrases ("the person for whom this item was obtained..."). It's dead in prepositional phrases that haven't been fronted just like it's dead everywhere else.
Something vaguely similar happened in Spanish, where there is a special pronoun case that can only be used with the preposition con ("with"). There, the special case descends from, interestingly enough, the same preposition, Latin cum, instead of from the Latin case system. But the phenomenon ends up being the same.
It would be fair to call this ungrammatical in American English.
But whom does survive in fronted prepositional phrases ("the person for whom this item was obtained..."). It's dead in prepositional phrases that haven't been fronted just like it's dead everywhere else.
Something vaguely similar happened in Spanish, where there is a special pronoun case that can only be used with the preposition con ("with"). There, the special case descends from, interestingly enough, the same preposition, Latin cum, instead of from the Latin case system. But the phenomenon ends up being the same.