AFAIK, there is no way to reserve a tenant name so if customer decides not to convert the trial tenant into a paid one, it might happen the situation you have described. I'm not also aware of any official Microsoft document describing for how long a expired tenant is manteined in the datacenter so the tenant name cannot be used. Best thing to do here if you have this problem again is just to by a single license of the cheapest Office 365 plan so you not fall again in the same situation
Or you know, just add another set of trial licenses :) There's always something new coming out (E5, M365, etc), and there are also plenty of free licenses that will keep the tenant alive, basically any of the "viral" subscriptions would do. I have a "test" tenant I've kept alive for years now.