You managed to 'simplify' your problem into something quite different from your second explanation.
That second explanation may be a bit oversimplified too.
Your pseudo code does not make your workflow much clearer.
This forum is not really a good place to gloss over 'details'.
for example:
Why are you unioning the subfiles of Shapefile1?
Where does Shapefile2 come in?
is outfeatures always "X.shp"?
I assume you realize that there is a difference between outfeatures and outFeatures ?
why does a for loop start up between two union operations?
No one can guess any of this.
Post your real code, and put it between code tags (the '#' button on the editor toolbar).
Be all that as it may...
If you have concerns about geometry issues, I suggest converting the shape files to file geodatabase feature classes
and then running check or repair geometry. Shapefiles can be depressingly tolerant of internal faults.
I assume your output is important, I asked if there was any output from the first stage(s)
(that is, in the "two intersects" you were trying to union, as per your first post).