SEOUL—Apple Inc.’s recently revealed stumble in China is an all-too-familiar story for smartphone rival Samsung Electronics Co.

Five years ago, the South Korean technology giant sat atop the Chinese market, selling nearly one of every five devices there. Today, Samsung is an also-ran, controlling less than 1% of the world’s largest smartphone market. Samsung has trimmed local staff and last month closed one of its two Chinese smartphone factories.

...