I use this Firefox add-on called Redirector that I just realized is probably one of my top add-ons, behind of course uBlock Origin. It's super simple to use, and makes my experience with the Internet actually bearable.
Basically it redirects maps URLs to other URLs, thus the name. However, it can also use regexen and capture groups, which leads to really powerful use-cases. I use it for nitter, libreddit, scribe.rip, and more.
I also just realized that I can import and export rules, which is A+! Here are the rules I have defined so far in an importable JSON. Maybe it can get you started!
I just remembered I also did something similar for Emacs's
browse-url functionality. If you use Emacs and don't use
browse-url, you're missing out, for real. Anyway, you can find
another addendum 2023-02-18
I just found out about the incredible farside, which redirects to privacy-respecting alternatives that work automatically. I've updated my Redirector config to reflect that.