While (currently) factory buildings aren't required to be built on foundation (which makes sense, given that they include a floor), buildings can't be built directly on the factory building floor, requiring building a floor on top of the floor.
For the least hassle for you, I suggest you make a per-surface exception for the surface used by the notnotmelon fork of Factorissimo, as all factory buildings exist on it at once. (That method should also make BRF work properly with mods like Warptorio, where each non-planetary surface has a floor.)
Does that make sense to you?