We've seen numerous examples that the Federation transporters are not strictly line of sight. People have beamed into and out of sealed caves ("The Cloud Minders"), buildings and other starships—even those ostensibly on alert ("The Enterprise Incident"). The transporter may have a limit to how much material it can safely penetrate, but it is obviously not line of sight. The communicators have no trouble reaching over the horizon—or do you suppose Federation starships deploy communication relays into orbit every time they approach a planet? The "standard orbit" as synchronous doesn't wash, either. There are numerous episodes establishing orbits as much closer. (e.g. "Mirror, Mirror" with target cities passing out of range over the horizon.)
As for Gary Seven, he was beaming across many lightyears. The sender may have been seeking to "lock on" to a receiver. The Enterprise
was unexpected and, perhaps, actively scanning Earth with its transporter sensors. That would seem to be the case, otherwise why would Spock just happen to be hanging out in the transporter room at the time? Spock also said that "we" have accidentally intercepted someone's transporter beam, not that someone's transporter beam had intercepted the Enterprise
. (Sci-fi writer James P. Hogan used a sender-receiver time travel setup in THE PROTEUS OPERATION. An accidental connection with an unexpected receiver happens several times in the course of the story.)
Lastly, even if we assume Flint's technology is
line of sight, all we see is a handheld remote control. His planet may have the necessary hardware arrayed to cover all directions. After all, directors aren't obligated to show a revolver being reloaded for the audience to assume that such has been done off-camera and between edits.