Where we need to start with this question is how you are defining "TRAILER". Is it a "HOUSE/TRAVEL/RV TRAILER" licensed by the DMV? Or is it a "FACTORY BUILT 'HUD' MANUFACTURED HOME"? Or is it a "FACTORY BUILT MODULAR HOME"?
If it's a "TRAVEL/HOUSE/RV TRAILER" chances are there are not too many building jurisdictions that all permit the long term habitation of it. If you are going to build a home on the property you may be able to obtain a TEMPORARY PERMIT to reside in the TRAVEL TRAILER on site during the construction process. However, these are temporary permits that are issued for short term periods usually in 6 month increments which can be renewed under certain conditions.
If it's a "FACTORY BUILT HUD MANUFACTURED HOME" it will depend on the zoning, building ordinances and "CODES, CONDITIONS & RESTRICTIONS" (CC&R'S) of the neighborhood you are seeking to build in should there be any.
But do be careful with a HUD MANUFACTURED HOME in any event. Once the construction/installation & set up of the home has been completed and you need to take out the construction loan for a mortgage loan you may have a problem getting comps unless there are other HUD MANUFACTURED HOMES in the immediate neighborhood.
I've seen a lot of folks get stung whence the appraiser only has HUD MANUFACTURED HOMES in a "MOBILE/MANUFACTURED HOME PARK/COMMUNITY" to use for comps. This happens often and can end up costing the homeowner his home and land as he doesn't ave the ability to pay for it unless he can secure financing.
Lastly, if it's a "FACTORY BUILT MODULAR HOME" you shouldn't have any problem getting it permitted as long as it complies with the "CC&R's" in the neighborhood you are seeking to build it in. "FACTORY BUILT MODULAR HOMES" can be finished out with stucco exteriors, tile roofs curvilinear architectural details, etc and can be made to look like any of the other homes in that specific community.
But if there are strict "CC&R's" you will still have to get your plans approved by the "HOMEOWNERS ASSOCIATION" governing that particular neighborhood which can be challenging. That stated you can also have the same options available in a "FACTORY BUILT HUD MANUFACTURED HOME", however, the same conditions apply as noted above regarding final appraised value and comps.
BTW, if you do install a "FACTORY BUILT MODULAR HOME" it is not a "DEPRECIATING ASSET". It is considered a "HOME" just like any other home in that community and is treated as such by the building jurisdictions, appraisers, lenders, inspectors, etc. Hope you find this information helpful.