堀 and 溝: moats, ditches, and rifts between people
Compare 堀 for a castle moat or field-side ditch with 溝 for a roadside ditch or a rift in a relationship. Follow the overlapping physical meaning and the abstract relationship meaning.
A moat or ditch with 堀
堀 (ほり) means a moat or ditch. 「古い城の周りには深い堀がある。」 means “A deep moat surrounds the old castle.” It names the deep moat around the castle.
「畑の脇の堀に雨水が流れている。」 means “Rainwater is flowing through the ditch beside the field.” The same noun also names a ditch beside a field.
A water channel or rift with 溝
溝 (みぞ) means a ditch or rift. 「雨水が流れるよう道路脇の溝を掃除した。」 means “We cleared the roadside ditch so rainwater could flow through it.” The roadside ditch was cleared to allow rainwater to flow.
「意見の対立で二人の間に深い溝ができた。」 means “Their disagreement created a deep rift between them.” With 二人の間, 溝 names a rift between the two people caused by disagreement, rather than a dug water channel.
An overlapping ditch meaning and a different target
The field-side 堀 and roadside 溝 can both name physical ditches carrying water. The examples do not define the words by a fixed difference in depth.
When applied between people, 溝 can describe a gap in their relationship. Even with 深い, the target distinguishes a rift between people from a moat around a castle.
Does 溝 in 二人の間に深い溝ができた name a ditch carrying water?
Show the answer and why
Here it means a deep rift in the relationship caused by disagreement. The spelling is the same as the roadside ditch example, but the target is different.

