Both are religions founded in India, yet the majority of Buddhist practitioners aren't there. Based on Wikipedia it looks like the majority are in China, SE Asia, Japan and Mongolia. On the other hand, Hinduism is still the predominant religion in India.
What historical factors led to this?
Addressing only your point on Hinduism staying local :
Hinduism historically spread to Burma, Malaysia, Cambodia, Thailand, Indonesia and Vietnam.
The largest Hindu temple the world has seen is in Cambodia (Angkor Wat) The king of Thailand is Rama IX. Over time, Hinduism in these regions faded into cultural background, while more recent religions such as Buddhism, Islam and Christianity won adherence and converts.
First things first, here's a (very short and very abridged) history of Buddhism in China and then Japan. (There's a too long ; didn't read at the end of my message, you can skip all the history thing)
Buddhism has been introduced in China during the Han Dynasty, but was not really that important, it was more like something you would find interesting, that was foreign ... But many Chinese officials considered to be barbaric and not deserving to be a part of China. Hence it spread differently, after the fall of the Han dynasty, during the Sixteen Kingdom period, and thanks to foreign invaders. I will take the example I know the most : In the 3rd century, the Buddhist monk Fotudeng converted the warchief Shi Le (from the nomadic Jie tribe), who founded the later Zhao dynasty of China. Then his students developped local temples, and they converted more and more people through time, because they brought some sort of economical stability to a China that was a bit chaotic to say the least. (there's a MOOC on edX called "China" about that by the way, it's totaly free to access). An other notable example is the dynasty of the Northern Wei, that conquered a huge part of Chinese territory, and spread Buddhism in their land. But I know this part less so I won't talk about it a lot. When the Sui and the Tang reunited China, Buddhism, thanks to these foreign tribes and the local Chinese Buddhist monks, was a part of China, and hence the Tang considered Buddhism a part of China and even invited buddhist monks to the Court.
When it comes to Korea, I know history a bit less, so my answer will be a bit shorter (but it's necessary to understand for Japan) : Buddhist monks from China traveled to Korea and converted the kings of the Three kingdoms (Baekce, Silla, Koguryo).
From the Korean kingdom of Baekce, Buddhism spread to Japan (beginning of the early 6th century). Japanese people were, overall, against Buddhism, thinking that this foreign religion would anger the kami (the shintou gods of Japan) ... But seeing that all the Korean kings had converted to Buddhism, emperor Kinmei, in the middle of the 6th century, decided he had to choose a clear way between Buddhism and shintou. Soga Iname, member of the Soga clan, wanted the emperor to make Buddhism the State religion, while clans Mononobe and Nakatomi thought that converting to Buddhism would provoke disasters (because that would anger the kami). Emperor Kinmei decided that Buddhism wouldn't become the State religion, but people of Japan could believe in Buddhism and worship the Buddha privately. (I'll skip about 40 years of Japanese history : to sum it up : the Soga defeat the opposing clans and assassinate an Emperor and become the most influential clan of Japan)
At the end of the 7th century, the Soga "rule" alongside Empress Suiko and Prince Shoutoko Taishi. The three of them were fervent Buddhist and of course, their reign has been pro-buddhist. They built temples and translated sutra for example. That's how Buddhism became very influential in Japan.
Then, we are in the first part of the 8th century, during the reign of Emperor Shoumu. Tax burden was a big problem in Japan, and people suffered from starvation and poverty ... So Emperor Shoumu thought that praying the Buddha would solve the problems. Consequently he built statues of Buddha, the government encouraged the monks to translate the sutra, convert people, teach Buddhism ... Of course, Buddhism was very strong since the rule of Empress Suiko, but the reign of emperor Shoumu was "the nail in the coffin" in a way.
On the other hand, Hinduism, as far as I know, never had missionaries in China or, if they had, they never managed to be allied with powerful clans. That's the reason why it never became a thing.
Too long; didn't read : Buddhist missionaries managed to convert chiefs and, hence, spread in a "top down" manner, while hinduism never managed to convert a Chinese leader.
Some sources now :
PS: I'm not a native English speaker and I'm not used to writing messages like that in English ... So I did my best to reread it, but I can't guarantee that it's pefect ... If I made mistakes, don't hesitate to tell me!
There is no conversion in hinduism. You have to be born to a hindu or married to a hindu to become hindu
There were centuries of debates between followers of Vedic thought (Hindus) and Buddhists. There are some opinions that Vedic thought was suitably defended in these debates and the vedic tradition continued in India. There were travelling preacher/philosophers who undertook "tours of philosophical conquest". Shankaracharya was considered successful in these tours and debated with various sects, including Buddhists.
The unrelated various Moghul invasions also took place in which there was much killing and destruction of religious institutions. You can see the history of Nalanda. It is also possible Hinduism was better protected against these foreign invasions which were trying to destroy local traditions.