Credit for the main function of unliking posts goes to Ian Thompson (https://gist.github.com/ianathompson) from https://gist.github.com/aymericbeaumet/d1d6799a1b765c3c8bc0b675b1a1547d
I simply added stuff to it to make it work with some of Twitter's weird new functionality.
Note, the script CAN and probably WILL break and stop working (it tells you and stops printing to the console), so monitor appropriately and if it stops before clearing all likes, then REFRESH THE PAGE and rerun the script as many times as needed. It usually clears around 50 likes before it breaks for me.
Usage is to navigate to your "Likes" tab in your browser and then just copy and paste the script into your dev console (press F12)