I read https://wpml.org/documentation/support/translating-the-theme-you-created/ and I understand that the plugin will use different PO & MO files for different languages. However, I just wonder which language will it choose? To my understand, when it invokes load_theme_textdomain, it will detect the locale of the current post/page, and then use that locale to find the corresponding PO/MO file. Is that correct?
To answer your question, yes, using load_theme_textdomain is the correct way to load the appropriate .po and .mo files for the theme strings based on the language selected.
However, it's worth noting that translating posts and pages works a bit differently. When you translate a post or page, it creates a new entry in the database. When you view that post or page in a different language, WPML retrieves the translated version from the database, rather than from the .mo/.po files.