IIRC Samui is one of the destinations where someone arriving on an international flight clears immigration at BKK, but customs at the destination, meaning the bags get checked through to USM.
With a 6h layover, I would exit the secure area anyway and go to Bangkok for a few hours, as you will only have access to the forgettable domestic TG lounge (better to rearrange your bags on the seats at an empty gate). Re-entering the secure area will be quick, as there are hardly any lines on the domestic departures side; in fact I don't recall seeing a priority security lane there, but it has been years since I have flown domestic C.
What I would question is whether you wish to pay Chubb THB100 a day for 40 days. What I do in such mixed weather travel through BKK is to leave my bag at the first hotel and recover it shortly before flying out. Any Thai bellman will be more than happy to oblige for a THB100 tip. Be upfront about the duration of storage, as many places have a limitation on this.
I have grown not to rely on the Chubb storage facility at BKK, as they will refuse any bags with electronics in them, and these days sometimes are full, especially during Chinese holidays (both facilities were 'pick up only' during the last CNY). Suvarnabhumi airport is running beyond capacity and it shows.