I'm pretty sure it checks until near by block stability is all lower than the block being checked. Then zips to bedrock to be sure that the column is fully supported. Haven't seen the code. But by video tutorials that demo everything except subterranean air pockets and just how things seem to behave in game.
What I find to be the most vodoo is the load sharing that's done by two unsupported blocks. But I think that's a simple matter of, if we're both unsupported, we split the weight of a block that's attached to us both.
Referring to scenarios like...
Ssssss
Sssss
Ssss
Sss
Ss
S
S = Supported to bedrock
s = Unsupported
Where the top platform should only be able to hold 4 wood frames out, but because the Support underneath, it can hold 5 or 6 I think. But more than the 4 wood frames with nothing but air under them.