StevenGLee that's an interesting idea, but I am afraid that no such extension or feature exists at the moment, as far as I know.
However, you might not actually need this. I am not sure how large your forum is at the moment, but just for perspective, the limit for user accounts at FreeFlarum is 20 000 (so, accounts in the database - whether online or offline, active or inactive, etc... = everyone), which I consider to be sufficient for the forums that FreeFlarum hosts - anything above this number should be hosted elsewhere.
The reason why such "limit" is in place is that there is currently no reliable system in place that can automatically monitor and determine whether a forum eats too much server resources at the moment (I quoted "limit" because it's not really a hard limit, just some milestone at which we should be more alert and occasionally watch server resources more closely). Because of this, I just calculated some numbers based on average amount of discussions, posts and users, biggest forums at FreeFlarum, etc... and put the details on this page: https://docs.freeflarum.com/en/legal/terms/#1-limits (but I am sure that you have seen this already)
Note that even if your forum does reach these numbers, FreeFlarum does not immediately remove your forum (and frankly, I am not even sure if there was ever a case when this number was reached, so far). Instead, I imagine that if it indeed happens, I would probably just e-mail you and we could figure out a solution together (either migrating elsewhere or one-time mass reduction of inactive user accounts).
But I see this is still an interesting concept at least, that is: automatically cleaning up inactive accounts. I suggest you create a new discussion in the Proposals tag if you want, and someone might develop your idea into an extension. I can imagine that it might possibly be beneficial for other forum administrators too?