Q:

Did China ever consider a phonetic writing system?

I was surprised to learn the following about the Japanese and Korean languages:
Japanese used a lot of Chinese characters in their language and had no phonetic system, until around the year 800 when they made their first kana. (They still use a lot of Chinese characters, but the point is they originally had no phonetic system, then made one.)
Korean also used a lot of Chinese characters in their language and had no phonetic system until around the year 1443 when they made Hangul. (I'm not sure if they still use a lot of Chinese characters, but the point is the same as Japan.)
So you can see how this brings up my question. Did China ever consider a phonetic writing system? In other words, are there any emperors, scholars, court eunuchs or other offices, or just wise men of some school like Confucianism or Daoism or something... who wrote down some thoughts on considering a phonetic writing system?
Did any of them at least note what Japan and Korea did, and explicitly reject it? And most crucially, did they state their reasons for rejecting it?
The time period I'm interested in is pre-modern China. In other words, ancient times to 1912.
EDIT: The analyses are fascinating, but they're not what I'm asking. I'm just asking for examples of some written record of some Chinese person, writing down his thoughts on a phonetic system, why he considered it and why he rejected it... if such a record exists. I would really like to see what were his own thoughts.

A:

No, there is no known record of that kind of native linguistic script analysis in pre-modern China, although its quite possible it came up and was rejected, for reasons I'll outline below.
The main issue here is that the mostly-logographic system China uses has historically been covering up for the fact that quite a few Chinese "dialects" are not mutually-intelligible (eg: Cantonese, Suzhounese, Sichuanese)1. IOW, they are really separate languages. On top of that, large swaths of the country are inhabited by people who even the Chinese will admit don't speak Chinese.

You obviously can't write a single document for several completely different languages using a phonetic-based writing system, without having to translate everything you write into every one of the different languages. Not only is that a crazy amount of work, it would erect brand new cultural barriers between all the various languages. Its possible the entire popular concept of "China" as a culturally unified unit could fall apart. This is why they've been forced to stick to logographs.
That being said, there was Nüshu. This was a fully phonetic syllabary, which means it only needed about 120 glyphs (with a further 500ish logographs borrowed from Hanzi). The story of Nüshu is probably the best example a historian could ask for of the problems posed by trying to promote a phonetic writing system in China.
It was regional (as it would have to be, covering only one dialect). In this case, the dialect it covered was Tuhua, which is of course mutually unintelligible with any of the major Chinese dialects, and is spoken only in the border regions of three neighboring south China provinces. Obviously the script wouldn't be of much use outside those areas, as its "installed base" of Tuhua works wouldn't be intelligible outside those areas. 
The script was so low status compared to Hanzi that it was used almost exclusively by women and its history wasn't really recorded. But we know it is at least as old as the 13th Century, and probably no older than the 10th. Its usage seems to have fallen off drastically once women were allowed the level of education required to learn Hanzi. According to Wikipedia, the last proficient user died in 2004.
There are several transcription systems used to translate Chinese into other existing writing systems, like the Latin and Cyrillic character systems. However those appear to be mostly used for the benefit of those who don't speak Chinese, or for those who don't have easy access to native Chinese keyboards, displays, and whatnot.
1 - This would be roughly equivalent to a single government conquering all of Europe and declaring that its (mostly Indo-European speaking) residents actually speak the "European" language, German is the official dialect, and English, Dutch, French, Spanish, Russian, etc. are all just regional dialects of European.

A:

Yes, but neither by the Chinese nor only for Chinese.
Kublai Khan ordered the Tibetan Sakya trizin Phagpa to create a universal alphabet to be used by the languages of his empire. It's usually known after him as 'Phags-pa Script'. Because he wasn't interested in marking tones, Phagpa differentiated Chinese syllables by recourse to outdated pronunciations contained in earlier dictionaries. It got used in official documents but never displaced the separate local scripts.
Phags-pa never had a reasonable hope of replacing Chinese characters in particular without a campaign of massive oppression against the empire's own clerical class, which Kublai and his tax collectors weren't remotely interested in.
To the Chinese, characters were civilization itself...
It's important to note that—apart from acting as China's version of Latin—any Chinese characters were revered as holy in and of themselves. They were considered inspired by Heaven, handed down from their great first ancestors, and a perfect encapsulation of the quintessence of Nature's myriad things. The majority of characters—the ones that aren't based on direct drawings of their subjects—usually encode information on both meaning and pronunciation and were thus still considered 'ideal', even when pronunciation could drift as far apart as 工 (gōng, originally kong) and 江 (jiāng, originally krong) or 率's two pronunciations of (s)rut turning into lǜ and shuài. Like Talmudic Jews ritually dealing with any paper containing the name of G-d, Chinese cities had special towers (惜字塔, xīzì tǎ) for specially destroying anything with writing upon it with the appropriate respect. That applied to shopping lists as well as sutras and the Confucian classics.
The very concepts of civilization and peaceful civil life in Chinese are expressed in words dealing with literacy (i.e., in characters), not with agriculture: 文, 文明, 文化. The native name of most 'Confucian Temples' is actually 'Temples of the Written Word': 文庙. The highest of the 'Three Perfections'—calligraphy, poetry, and painting—was beautiful and idiosyncratic penmanship, and its influence overflowed into the others. Li Bai's most famous poem memorably captured the spill of moonlight across his bedroom floor in a sprinkle of 'moon' and 'light' characters across its lines; painting followed the technique and criticism of the calligraphers. Their work also formed one of the 'Four Arts' of the gentleman, alongside painting, go, and the zither. Three of the great Chinese inventions—greater than gunpowder or the compass within their own culture—were tech dealing with the written word: paper, block printing, and moveable type.
The characters are also cultural artifacts as much as writing script. Some form the basis or important points in stories, jokes, riddles, &c. Some are tied to ideas about the Five Elements. Including the proper stroke number or character radical was reckoned essential to properly harmonizing a person's identity with the universe (read: stars) at the moment of their birth.
...and syllabaries, let alone alphabets, were infra dig...
As T.E.D. pointed out, there was a semiphonetic 'Women's Script' used by the Han women of Jiangyong in the wilderness of southwestern Hunan. No one paid attention to it or cared until the late 20th century.
The medieval Chinese didn't pay attention to their own syllabaries, let alone those of tribute and barbarian peoples. But the Koreans and Japanese themselves felt the same way. Within Korea, hangul was the province of 'illiterates' like women and the laboring classes; proper gentlemen used characters regardless of their awkwardness for their language.
Decent Korean and Japanese diplomats would've avoided the topic, not shown it off.
...until modernity.
Once the Shang Dynasty started using the characters as a religious script to divine the will of Heaven, alphabetic Chinese was probably a lost cause, even though the early forms of the language differentiated their words with terminal consonants and consonant clusters instead of using many homonyms distinguished by tone.
The Mongolian overlords tried for a bit to see if they couldn't universalize and standardize everything (They couldn't), but the serious push among the Chinese themselves for change had to wait until after the Opium War, Taiping Rebellion, and industrializing Europe's gunboat diplomacy made the inadequacy of the old Confucian model plain. Nearly every European involved wanted the script replaced, and some Chinese intellectuals agreed.
Dhi Fonetik Titcerz' Asociecon's IPA was becoming universalist by 1900 but its eventual symbols for Mandarin are a mess (incl. ɕ, ʈ, ʂ, ɥ, ɻ, & ʰ) and it was never considered. Instead, the Republic's early commission on standardizing Mandarin went their own way with zhuyin ('phonetics') based on simplified characters with similar sounds. By 1930, politics made them change the name from 'phonetic letters' to 'phonetic symbols', clarifying that they had no intention of using them as actual letters for Chinese.
In the '20s and '30s, advocates plumped the Nationalists' 'Mandarin Romanization' (Guoyu Luomazi) and Soviets' 'New Latin Script' (Ladinghua Xin Wenzi) to replace characters but—despite the Soviet system working fine in CCP controlled areas of the north—the Communists eventually abandoned it in 1944 to increase their appeal among all classes through the rest of China.
After the Communist revolution, when all things traditional were to be replaced with Revolutionary fervor, they tried again. They gave up again, given the many many many homophones following the transition from Middle to Modern Mandarin, annoyed masses, and the danger posed by regionalism. As we've talked about, Mao Zedong's original idea as pinyin was being developed in the '50s was for it to replace Chinese characters in toto and force the Mandarin dialect across the country. In the end, modern Chinese is just much clearer and more beautiful the way it's already written; he gave up by 1958. Pinyin is just used in transcribing names into other languages and for teaching kids the pronunciation of the characters.
What happened instead was the Chinese script itself was simplified a few times and the vernacular was accepted as literary writing. Kids still have to deal with 'difficult characters' (繁体字, fántǐ zì) and 'the ancient way of writing' (古文, gǔwén) on tests, but they don't have to deal with either in daily life if they choose. Despite what early reformers feared, keeping the characters doesn't harm Chinese educational efforts at all; the kids aren't all as happy as the Finnish but they rank just as highly. That it helps keep foreigners from accessing and influencing Chinese culture is now probably considered more of a feature than a bug.

A:

TLDR: Phonetic scripts won't work because of how the Chinese languages are structured. So it never really came up before Europeans arrived.
Language Issues: 
There are several ways to answer this question; before I get into the history, it is important to ask: Is it possible to represent Chinese in a phonetic script?
According to my first Chinese language book, Beginner's Chinese by Yong Ho, Putonghua [i.e., Mandarin] has 21 consonants and 6 vowels, and most syllables are organized in a CV (Consonant-Vowel) format. Some examples of CV in English: be, he, me. Chinese has a handful of standalone V words, but they usually start with the glottal stop consonant like the one in uh-oh; there are also many CVC words, but the final consonant must be a nasal n or ng; finally, there are some VC words without an initial consonant. And that's it. English, on the other hand, has many, many different syllables: VC (up), CVC (big), CCVC (dread), CVCC (mask), CCV, CCCV, VCC, VCCC, CCVCC (brand), CVCCC, CCCvCC, CVCCCC (texts), etc.[1]
So with only 21 constants and 6 vowels, there are only about 1000 possible sound combinations, and about 400 get used. Add in the 4 tones, there are 1600 sounds combinations. In English, there are more than 158,000.[1]
The limited number of syllables means that there are a ton of words that would have an identical spelling. These are called homophones. While English has a bunch of homophones Chinese has so many that it would be impractical to use a phonetic script.
History:
However, this didn't stop people from trying. Chapter 2 of China's Soviet Dream (this book is awesome) speaks in great detail about language reform in the first decade of the PRC. China wanted to modernize, and many felt that with a character-based written language, literacy would not be possible. They looked, of course, for historical examples where Chinese people had achieved widespread literacy. There was only one, and it occurred in the Soviet Union.
Apparently, in the 1920s, there were a bunch of migrant workers from Shandong living in Eastern Siberia.  The Soviet Union invented a romanization scheme based on their Jiaoliao dialect called Latinxua Sin Wenz. It worked — these migrant workers learned to read the newspaper, allowing them to read SU propaganda.
For a variety of reasons, these migrant workers returned to China in the early 1930s, and they brought Latinxua Sin Wenz with them. As explained in Part IV of John DeFrancis's Chinese Language, the script was adopted by many Communists in their areas of control and adapted to dialects all over China, including Hakka and Shanghainese. Lu Xun and Mao argued in its favor, and the Communists gave it equal legal status to characters in 1941. World War II and China's Civil War interrupted literacy efforts. The system required accepting a lot of ambiguity because of its lack of tones, but that wasn't insurmountable to native speakers. Instead, the probable reason that the PRC abandoned it sometime in late 1949 or early 1950 was the criticism that its advocates were "a cultural movement of traitors". Having taken over the country, the Communists stopped advocating a policy that would permit greater balkanization. The Party line became to simplify the characters instead and to develop a new latinized alphabet with tones to teach pronunciation.
Latinxua Sin Wenz grew in to Hanyu Pinyin, which is in common usage throughout China today. However, it is rarely used for general reading; it is more of an instructive tool to facilitate the dominance of the Beijing Dialect, with the explicit goal of limiting China's linguistic diversity and centering power around Beijing and this the CCP. Hanyu Pinyin makes it easier for me to learn Chinese too!
However, you specifically asked about attempts to use a phonetic script prior to 1911. To my knowledge, the first attempts were intended primarily to help Christian missionaries learn Chinese, with one scheme by Matteo Ricci dating to 1583. However, these schemes were developed by non-Chinese for a variety of reasons.
The first phonetic script that I am aware of, developed by a Chinese person, was in 1892. This scheme, however, was merely an extension of the missionaries' attempts and was definitely part of a modernization/literacy scheme.
[1] Ho, Yong. Beginner's Chinese. Hippocrene Books, 2005.
[2] Li, Yan. China's Soviet Dream: Propaganda, Culture, and Popular Imagination. Routledge, 2017.
[3] DeFrancis, John. The Chinese Language: Fact and Fantasy. Univ. of Hawaii Press, 1984.

