The simplest solution of course would be to just delete the oldest messages but that of course could delete more important messages.
Another idea was that I could let ChatGPT summarise the conversation when I am close to the limit and then only save that message.
Maybe theres already some better implementation that I am not aware of?