Hmm, seems the Get All Emotes endpoint is gone, but the Get Chat Emoticons by Set still works and if you don’t provide the optional emotesets param it’ll just provide anything anyway.
As for how to get the emote id, if you’re connected to chat then part of the tags that get sent with each message includes the emote id of every emote used in the message, along with the position within the message where that emote is, which you can read about here: https://dev.twitch.tv/docs/irc/tags/
If you just have message logs with none of the associated tags, then yeah it’s going to be problematic for you because you’ll have to get a list of every single emote and its corresponding ID, and parse every single message to check for every single emote. Which from a performance point of view is going to be a massive hit. This is why I highly recommend using the id of emotes from the tags rather than doing it this way, but I don’t know your use case so I’m not sure what is possible for your specific situation.