I want it to use as secondary sonar for measuring depths as low as 4 inches.
Depth is a speed over time calculation.
The speed which a sound travels waters thru is heavily influenced by environmental factors (salinity, temperature, sediment load, etc.) so engineers typically use a "standardized" value for speed. However, neglecting the effects of the actual conditions can introduce significant errors. Add in the variables and limitations of the measurement of time (transducers and processors) and the accuracy can be quite poor at any given time.
The actual limits to performance are related to the quality of the transducer(s), electronics, and software. Shallow water sonar performance is poor at best. Too much (signal saturation) and to fast to process with any accuracy. Using Variable frequency (CHIRP) and Low "Q" transducers help but you still end up filtering the heck out of the returns and hoping for the best.
Having said that, your expectation of using 2" of clearance is unrealistic. A boat's pitch, roll and squat combined with inherent inaccuracies of a sonar based depth reading could easily exceed the allotted clearance.
My alarm is set at 10" below the skeg of my outboard and I've "kicked" bottom more than a couple of times.