New Mexico? Most of the state is off grid. However, as soon as property changes hands the County will be in assessing for taxes and will figure out what you are up to. I don’t think there are any restrictions about placing containers on land beyond possible city and larger town zoning. Living in the container is another story. Building code applies throughout the state and is enforced proportionatly to how far the inspector has to travel, county budget available, and how much your neighbors complain about what you are up to. If you want to make a home out of your container then you need to follow code, or risk problems down the road like you say. Doable and many have. Biggest issue here is a reliable water supply, which does not come cheap; and composting and in general living does not happen without water. Really cheap land is available with no water, and some areas of the state even have water deliver services. Areas to look at are NOT TAOS, extreme northeast, west of Taos out to Farmington, east central, west central, and southwest in Catron and Sierra Counties, which have low populations and minimal government intervention. The border areas/ Colonias have there own set of difficulties.
What others are reading
For films about individuals and technologies for living off the grid X