Send the message initially with the <tg-emoji> tag. This will result in a regular emoji being sent, but it allows you to get the custom_emoji_id.
Retrieve the custom_emoji_id from the sent message.
Construct the correct HTML using the custom_emoji_id.
Edit the original message with the correct HTML.