Not really “activity” in terms of “has anyone visited this topic”, but there is the topic timers feature that can auto-close / auto-delete topics based on a set datetime or by hours after the last post datetime.
At SitePoint we have most categories set to auto-close topics when a topic hasn’t gotten a reply for a few months. The topic can still be read, Likes can be given etc. so in a way they could still be considered as “active”. Activity in this context means “getting replies”.
We have not tried auto-deleting topics, but my assumption is it would work similar to auto-close. I do not know if deleting the topic would negate some statistics eg. Like counts, post counts, etc. so you should take that possibility into consideration.