Given that
the bot has access to the chat
the only way is guessing.
That is, try get_message(chat_id, message_id=1000), if it exists, then try message_id=10000; otherwise, try message_id=100. Repeat this procedure until you find it.
get_message(chat_id, message_id=1000)
message_id=10000
message_id=100