Japan has outbound passport control at the airport, so the big question will be when your flight is cancelled and which side of the passport control desk you are standing on when your visa expires.
If your departure flight is cancelled before you get to the airport you will not get a boarding pass, will therefore not get past security and therefore will not be able to "depart" the country.
If your departure flight is cancelled at the gate, then you are fine. You have a boarding pass, you presented your passport to immigration who stamped "Departed" right beside your tourist visa. You have now officially left Japan. If your airline declines to take you anywhere, immigration will either re-admit you to the country or suggest some place in the terminal building.
Your gamble is which one of those will happen.
If you are on the last day of your visa and the first case happens, you had better hope immigration is in a good mood, because they have NO obligation to do anything for you at this point. Or you buy a same-day ticket to anywhere else.
Just book a departing flight at 85 days. Especially if you are coming in typhoon season (June-October).
If you (or future readers) are thinking of cutting it close, don't forget that "90 days" and "3 months" are NOT the same.