Not sure if you can reliably track the first follower, you basically just update a kind 3 event which might be in correct order or not.
The other things should be queryable with currentl frameworks and some logic. Rust-nostr (with bindings to other langs) might help