How can Japan have a different constitution that is more amenable to a stable democracy, or something that could reform into a stable democracy through protest and whatnot, and what factors would cause such an adoption?
Does this mean you need handwaving to get a democratic and more socially liberal Japan that didn't need to go through a major defeat?
One of your major obstacles is one of the Articles (IIRC 11) of the Meiji Constitution which states that the War/Army Minister must be a serving general or field marshal and the Navy Minister a serving admiral/admiral of the Fleet. That gives both the Navy and the Army outsized power, as either minister can resign, the armed services can refuse to find another officer to fill the minestral position, and bring down a cabinet.
The trouble with amending the Constitution is that the military has incredibly high public support, because Japan had an unbroken string of victories from the Boshin War to WWI. The Navy, after WWI also takes up almost a third of the national budget, but is the third-strongest in the world.
It isn't impossible to have a more peaceful Japan, though.
If you want a more conservative but not insane, militaristic Japan, have one of the many military coups defeated decisively. Make sure Sadao Araki and Kita Ikki are either executed or commit suicide. Have senior officers sent abroad to somewhere other than Germany for military education. A furious Emperor Hirohito is enraged that the Army would attempt such a heinous act against Japan, and
suggests that the many Imperial Princes make sure the Army carries out the Emperor's will.
Japan, before 1947, also had a Peerage, and what is now the House of Councillors, which was then the House of Peers. The lower tiers of the Peerage (Baron, Viscount and Count) rotated seats in the House, while the higher tiers (Marquess and Prince [the equivalent of a European Duke]) were entitled to a permanent seat. Pack the Peerage with less radical members, and elevate more liberal members to at least Marquess as well.
If you wanted a more socialist Japan, perhaps have the government really botch the recovery from the Great Kanto Earthquake, and the following Great Depression. You'll have a lot of very hungry, very angry people demanding change.