How to auto delete subsites after some amount of times?

As I want to keep a clean and compact DB, I'd like to delete any inactive subsites after they haven't been active and paid after, say, 3 months. Please advice on adding a script in mu-plugins to delete any subsites which:

1. Still on a trial period without any plans purchase. AND
2. If no.1 is true, if the site creation date ages xx days/months already, then perform the deletion by blog_id (the entire tables relating to the blog_id must be gone).

I found that many reputable sites having a permanent site deletion auto script running. An alternative that I think it's a better approach rather than waiting for unpaid and inactive site users to delete their own site. Thank you.