I’d say, the more you see if this type of stuff, the easier it gets to tell. And frequency of comments is also a dead giveaway - if the account is posting every 20-60 seconds, you can be pretty sure it’s a bot - and deserving of at least one flag.
If it’s a real person, usually there’s at least some variance in the content, however small.
I don’t necessarily feel “punishment” is always called for. If it’s outright spam and intentions are clearly selfish, a flag might be in order - with a comment explaining why. If they acknowledge the mistake and stop, I usually have no problem removing the flag. Sometimes, people just don’t know any better and need to be educated on proper etiquette here, and a combination of carrots and sticks can work wonders...