Efficient container handling is a critical aspect of global trade, as container terminals serve as the primary hubs connecting maritime transport and inland logistics networks. The increasing demand for faster and safer container operations has encouraged the adoption of the double chassis (dolly) system, which significantly accelerates loading and unloading activities. However, this system is also prone to operational risks. Extreme maneuvers performed by truck operators can cause collisions between the dolly triangle and the chassis frame, potentially resulting in structural damage, reduced equipment lifespan, and a higher risk of accidents. To address this challenge, this study proposes the optimization of limit switches as a motion boundary detection system in the dolly mechanism to enhance both safety and operational efficiency. The research combines experimental testing with mathematical model-based simulations, employing trigonometric analysis to determine the safe maneuvering angles of the dolly system. The proposed system integrates limit switches on the towing hitch to detect critical angles and provide early warnings through two alarm levels. The first alarm is activated at angles less than 40° as an initial safety signal, while the second alarm is triggered at angles less than 50° to prevent severe collisions. The results demonstrate that the proposed system effectively minimizes collision risks with a relatively low error rate, particularly at smaller maneuvering angles. The main contribution of this study lies in presenting a practical and low-cost safety mechanism that integrates simple sensor technology with mathematical modeling, offering an innovative solution to support safer and more efficient container terminal logistics.