Well, let's do some math! Yay!
There are 32 possible combinations of IVs from 0 to 31. You want 31, so that's a 1/32 chance you get that 31 IV.
Problem is, you want three 31 IVs. The formula for this would be 1/32³, since there are 32 possible combinations, and 3 IVs you want.
Doing the math, this leads to 1/32 32 32, or a 1/32768 chance of getting a Pokemon with 3 IVs of 31.
Pokemon in the Friend Safari already have 2 31 IVs right off the bat. This means you'd have a chance of 1/32, since there is only one more combination to fill.
Source: Experience with this type of question before and calculator