Update/change category of a post when it’s been inactive for a certain number of days

https://codex.wordpress.org/Function_Reference/wp_schedule_event
You can try using scheduled job to solve this.

In the hook, you would write a function that checks all posts from yesterday and see which posts have received no comments. Then you will move those posts to cat 2 from cat 1. I would come up with mock code if you can give me more context of

  • how many posts you have
  • Do you want the scheduled job to run once a day

This approach is simple to implement and will definitely work for small number of posts but if you post thousands of new posts everyday, then it would slow down your site while the scheduled job is running.