This is what I'm using for the past year or so, running daily as a cronjob: https://gitlab.com/tombrossman/TwitterDeleteMost
You can whitelist specific tweets to keep, and set a threshold for favorites or retweets above which the tweets are preserved. For example, if you tweet something and ten people retweet it, the script will save it forever. If you tweet something that no one retweets or favorites, it's gone after 30 days. I call it a 'socially curated' feed, since old tweets are basically worthless to anyone but strangers wanting to profile you.
And props to Mike McQuaid over on GitHub for originally creating this tool, and for helping me adapt it to my use-case.