dam, weir
偃 centers on a barrier that holds back water: a dam or weir. The idea is something that blocks and controls flow.
偃 combines 亻 (person) with 匽, which likely contributes the sound and may relate to blocking or stopping. The exact historical development is uncertain.
A person 亻 builds a structure 匽 that looks like a barrier with a sun 日 and a container 匚, holding back water like a dam.
For エン, imagine the dam ending a flood: end -> エン, and the person-built barrier stops the water.