I have a preference of the Four Noble Truth to be taught as the last Dhamma talk. However, in DN 16, the Buddha had another approach:
Then the Buddha said to the mendicants, “Perhaps even a single mendicant has doubt or uncertainty regarding the Buddha, the teaching, the Saṅgha, the path, or the practice. So ask, mendicants! Don’t regret it later, thinking: ‘We were in the Teacher’s presence and we weren’t able to ask the Buddha a question.’”
When this was said, the mendicants kept silent.
For a second time, and a third time the Buddha addressed the mendicants: “Perhaps even a single mendicant has doubt or uncertainty regarding the Buddha, the teaching, the Saṅgha, the path, or the practice. So ask, mendicants! Don’t regret it later, thinking: ‘We were in the Teacher’s presence and we weren’t able to ask the Buddha a question.’”
For a third time, the mendicants kept silent. Then the Buddha said to the mendicants,
“Mendicants, perhaps you don’t ask out of respect for the Teacher. So let a friend tell a friend.”
When this was said, the mendicants kept silent.
Then Venerable Ānanda said to the Buddha, “It’s incredible, sir, it’s amazing! I am quite confident that there’s not even a single mendicant in this Saṅgha who has doubt or uncertainty regarding the Buddha, the teaching, the Saṅgha, the path, or the practice.”
“Ānanda, you speak from faith. But the Realized One knows that there’s not even a single mendicant in this Saṅgha who has doubt or uncertainty regarding the Buddha, the teaching, the Saṅgha, the path, or the practice. Even the last of these five hundred mendicants is a stream-enterer, not liable to be reborn in the underworld, bound for awakening.”
Then the Buddha said to the mendicants: “Come now, mendicants, I say to you all: ‘Conditions fall apart. Persist with diligence.’”
These were the Realized One’s last words.