Interesting problem.
I would proceed in this manner:
Get the 'n' points (3D vectors really).
Get 3 groups (n/3), if 'n' is 40 for example: then 1 group from 13, other 13, and other 14. The groups are obtained randomly i.e. never mind what points.
Locate the "center of masses" from each group, for example for first group would be the arithmetic mean: ' v1+v2+v3... / 13 ' , where v1, v2, etc. are the points (vectors).
So you have now 3 points to build the wanted plane.
Repeat that algorithm adding to the 'n' those above 3 points, and using now a Weighted_arithmetic_mean (
https://en.wikipedia.org/wiki/Weighted_arithmetic_mean) giving to the 3 points a bigger "weigth" than the others.
Repeat again. So you will get 46, and the weight for the 3 points is now still bigger.
Repeat again.
The more loops the more accurate plane will obtain.