It's less an invasion although that would be a justification thrown about, and more religion period was always trouble in Japan. The Christians getting persecuted was more common distrust from both Nobunaga and Ieyasu's experience with the Ikko Ikki which could have happened with Christianity Shimbara Rebellion aside and Hideyoshi's experiences with the Japanese Slave Trade. The Ikko Ikki was a mass movement of peasants against landlords lead by charismatic Buddhist monks of a populist school of Buddhism the Pure Land School, you can replace with Islam or Christianity if need be. Islam in Japan requires both a good vector and a place where it can stabilize, and something that make it appealing. Christianity had guns, what can Islam offer? The Emperor did not mean jack for a long time, hell the current line emperors even trace their lineage to technically appointed usurpers. The reverence for the emperor is only a comparatively recent thing, what your talking about is the State Shinto of the Meiji era and beyond. The emperor's authority by the time of Shogunate was minimal and no one took pains to overthrow them because there was no power to be gained. So a converting to a foreign religion was not this mark of treason as you think it is.