pakistan regional influence is absolutely nothing compared to iran. They have border issues with india but that's pretty much it. Iran, without nukes, is already destabilizing at least 4 countries ( yemen, lebanon, syria, iraq, and that's without counting israel).
Imagining what it could do if its territory became a safe haven all of the sudden is simply terrifying.
Osama Bin Laden lived one mile from the Pakistani military academy, and appears to have been supported by the ISI, their intelligence service. It's a tremendous assumption of faith that Pakistani nuclear warheads are somehow safe.
Leaving that aside, Japan was not (even in the formal, substantively debatable, sense that the US was and is) a secular regime. State Shintō was an integral part of the system.
Observation: Pakistan is the only Muslim majority nation to own nuclear weapons. They currently own around 170 of them, (IMO they should absolutely dismantle them and join both the non-proliferation treaty (NPT) and the prohibition treaty). Iran is a member of the NPT has zero nuclear weapons, and have shown them selves to be cooperative in non-proliferation efforts (until the Iran nuclear deal was cancelled by Trump).
Israel has around the same number of nuclear weapons as Pakistan, is not a majority Muslim nation but is very antagonistic towards majority Muslim nation. Israel is not a member of the NPT, and has been extremely uncooperative in non-proliferation efforts. Israel has engaged in terrorist activities in the past, their government includes many religious fanatics (like Itamar Ben-Gvir), and are currently being accused of engaging in an ongoing genocide.
My observation is that you aren’t afraid of a terrorist nation run by religious fanatics getting a nuclear bomb, but rather of Muslim majority nation having them.
That you know of. Israel has never confirmed its nuclear weapons. I think it's more likely than not that other Arab nations have tactical nuclear weapons.
For that matter, I bet Japan has them. If the conflict between Iran and Israel goes nuclear I could see Taiwan also developing their own. The proliferation is only restricted by time, money, and expertise.
The thing about nuclear deterrence is that it only works if you announce that you have nuclear weapons, so we know pretty well who has them and about how much, not only via the NPT but also by simple game theory. Israel is probably the only nation that has nuclear bombs without confirming because it is the only nation who’s officials regularly threaten their use without officially declaring their existence.
NPT countries such as Iran can also acquire nuclear weapons without braking the treaty via Nuclear Weapons sharing[1]. This is how Germany, Turkey, and Belarus have nuclear weapons. If Japan or Taiwan wanted nuclear deterrence that is a route available to them (maybe that is even one of the goals of the potential Pacific Partnership military alliance; This is how Taiwan had these horrible weapons in the 1970s). It is probably harder for Iran though as they lack nuclear capable allies, but for e.g. Saudi Arabia, or Iraq, they could probably keep some USA weapons in at one of the many USA military bases (though I doubt Iraq would actually want that).
But you are wrong to omit politics as a barrier for proliferation. The NPT is strong, it has and most countries either comply with it, resign from it (North Korea) or don’t sign it. If Taiwan wanted to develop their own nuclear weapons they would need to resign from the NPT and potentially make any military aid from the USA infinitely harder in the process. I think their best strategy is to do enough nuclear research and have enough nuclear infrastructure so they are on the threshold of being nuclear capable without ever stepping over it (I think this is actually their strategy; as is Iran’s) that way they get the benefits of the NPT while still offering some nuclear deterrence, as in “we can develop them quickly if the need arises”.
Are you unaware of Pakistan?