Might need to visit a fair few branches until you get one that will do it for you.
But make sure you have all the papers with you, so you don't meet another person another time saying it's not possible.
You need your passport, a copy or your marriage certificate, and a residence certificate from Immigration. Some branches might ask for more. But those are the basics.
If you max out the time given, the chances are even smaller that they'll let you back in without a proper visa.
The "10 times" is more a hyperbole statement.
Get a Multi Entry Tourist Visa, or even a DTV Soft Power visa ( or workcation, if you are a remote worker )
the Multi Entry Tourist Visa will get you to 9 months, the DTV will get you to 5 years, but limited to 180 days per entry, that can be extended, but that's a hassle to do compared to leaving and coming back,
Thailand doesn't want people to live here on tourist visas and visa exemptions.