I see from inspection that living fences are used,
https://www.echocommunity.org/en/resources/5ee6afc7-aafd-4178-81c4-c219c54f6633
" Gliricidia
Gliricidia is a fast-growingnitrogen-fixing tree that grows up to 15m in height. It is used for living fences, green manure, fodder, honey production, wind breaks, and fuelwood. This tree tolerates dry, acid, alkaline, and salty soils and was traditionally grown to shade cocoa trees.
Leucaena
The genus Leucaena includes several multipurpose tree species and interspecific hybrids that can withstand almost any type or frequency of pruning or coppicing. They are native to Mexico and Central America, and now abundant in the Philippines, West Africa, Nepal, Australia and Hawaii. '
from Echo
https://www.echocommunity.org/en/resources/c4f09f85-3963-431b-adf3-539252ee9cef
“Farmers near Kabale in Kenya describe traditions, now considered superstitious, that certain euphorbias cause cancer when planted near the homestead.” [Euphorbias in Africa fill many of the environmental niches that are filled by cacti in the Americas.] Now the carcinogenic effects of one common living fence species, Euphorbia tirucalli, have been described. The active carcinogen has been found not only in the plant itself, but in extracts from nearby soil, vegetables and drinking water. “The report suggests that Burkitt’s lymphoma, a common childhood cancer in East Africa, is caused in part by consumption of water and vegetables from sites near this euphorbia.”
The plant grows profusely in Kenya’s Eastern, Western and Nyanza Provinces and in parts of Tanzania. In southwestern Uganda it is widely planted as a living fence to exclude livestock from protected springs, suggesting the frightening prospect that water that has been assumed safe is in fact very hazardous. It is also commonly used as a living fence to protect food crops.
From
https://www.echocommunity.org/en/resources/bca8c49a-7185-45a2-b7de-0b1e6a19a661
CONSIDERATIONS ABOUT LIVING FENCES
For western mind, tis knowledge is probaly well known in West Africa