When you work with the first horse, and you "flag" him, and he starts to run away from the flag, what do you do? Do you stop? Do you take the flag away?
If so, then you are teaching him to spook from it, Because he got relief from it by spooking away from it.
To desensitize him to it, you need to have him in a small area, on a line that is about 12 to 15 feet long and hold him close enough to you that you can keep the flag on or close to his flank, but long enough that he can move around you as much as needs to. YOu bring the flag up to his flank and even if he runs from it, you keep the flag on him. But, watch for signs that he'd like to stop for even a sec. If he slows or turns to look at the flag, give him a little relief.
The idea is anything that is him standing or thinking about standing and just being with the flag earns him relief from the flag. Everything else , such as him ruinning away from it, does not earn any relief. You just stay really calm but have the flag follow him and stay on his flank. Do not up the pressure, but don't take it away until he makes a change.
I suspect that horse number one has issues in general about things on his flanks. Can you take your coat off, while in the saddle, and swing it around, brush it against his flanks and such, without him spooking? If he is touchy about hthis,, then working on it is important to improve his riding safety.
Horse number two, I think may be a horse that worries more about his footing. I would do work with him having him walk on all kinds of different surfaces. If he is not a greedy or mouthy horse, you can give treats after he walks across tarps, piles of woodchips, sand, puddles, over poles, across a bridge, . . You name it.
It's not a bad thing to have a horse who is careful about their footing. I am just guessing that this might be what's going on in the horse's mind. Total speculation.