SHANGHAI—In the Philippines, popular views of America veer between affection and pained resentment, rooted in a brutal colonial past; American conquering forces picked up the technique of waterboarding in the country more than a hundred years ago.

Something of this history is captured in an epithet used by Philippine President Rodrigo Duterte, which cost him a meeting with U.S. President Barack Obama at a summit of Asian leaders in Laos this week: putang ina in Tagalog—“son of a bitch,” or more literally “son of a whore.”...