I say again, this is neither simple or well understood. Human factors is far more complex than most people think. If it was easy, you could buy a new microwave and not go bonkers for two weeks trying to cook something, or that car infotainment system wouldn't be trying to kill you to dim the screen at night. I've seen F-15E guys so task saturated and concentrating that they ignored not only all of the missile warning gear going off in the cockpit but multiple radio calls from others observing the engagement. To quote the Red Air defense commander "those guys are so ****in dead".
If you have no flashing lights in the cock[pit now, then flashing lights may get your attention. If you have flashing lights now, then the size, color, placement, etc, all will have bearing on your ability to perceive. When it comes to electronic flags, remember that the human brain is particularly adept to change detection (i.e motion). The flaggers communicate to you with motion, and there's a lot more info in the way they swing the things than is obvious. Flashing is motion - sort of.
Trackside warning lights? At club level tracks, those are called obstacles. Most likely they'd need to be in the current corner bunker locations - after all, those were chosen for sight lines and the current crop of drivers are familiar with those locations, (although there may be better locations if the safety of a human flagger isn't a consideration). Another consideration might be hanging them from overhead cables with the supports out of a racing impact zone.