Nothing illegal about it, private property, wood products off of private land. Buildings on private land. You transport Cedar or maple in certain sizes for commercial sale you need a permit, so when you need a permit you purchase one.

Building off grid, well I only do that on property outright owned and for cash, no permits required since they are optional anyways and if you are not dealing with a bank not necessary. How do you get around health codes? Pit toilets are legal and unregulated, most counties have "zoned" them out saying there are no suitable locations for them in their jurisdiction but they don't have jurisdiction over them anyways. Pit toilet is the most environmentally safe method to process human waste and its the cheapest and most simple application. You cant do better than a pit toilet when it comes to the environment, unless you put the pit toilet in a location where the water table rises above the hole, in that case you have an environmental hazard but only when the water rises.

You can do what you want on your own land, you have to invite trouble if you want it.