I have asked mailgun a number of times if they'd simply charge for longer storage limits, and they said no.
Thanks for setting this up!
In our own setup, we fetch data for the last 24h twice a day and then just insert everything. We have a db constraint on the message ID mailgun sends us, so only news ones will be persisted. We aren't even bothered with filtering before inserting, the db constraint does the trick.