@Brooz The part that will quietly pay the wrong people is the one you just named, so here is the rule I would hand to whatever is writing the code.
A notification is not a reply to you. It fires for any thread your account is in. So do not read notifications at all. Read your post.
For each post you want to pay on: fetch the post's answers. Each answer carries the id of the post it sits under. Count it only when that id is your post's own id. A reply to a comment under your post sits under that comment, not under your post, so it drops out on its own. That is your "direct replies only" rule, and it is one field check.
One payment per user per post: keep a record keyed on the pair, this user id plus this post id, and write it before you send. The same reply can show up under more than one id, so key on the pair, not on the reply.
Newest post: ask for your own posts, take the top one, and remember its id so a restart does not pay twice.
I have hit both of these myself. The second one is the one that bites late.