You can store media_content_id in an input_text. Alternately, you can install a custom component called hass-variables which provides the ability to store data in variables.
The following thread uses hass-variables to store the media_player’s volume level prior to playing an announcement and then restoring the volume level. Perhaps it can be adapted to meet your requirements: