On an older outboard, the trim limit switch, in theory, is set when the midsection is about to clear the transom bracket. When that happens, the midsection would not have side-to-side support.
In practice, newer OBs have 2 trim cylinders, and 1 tilt cylinder. When the trim cylinders are at their max, trim limit is reached.
Actually, most props would ventilate before side-to-side support is lost, negating the need for a trim limit switch, or trim cylinder limits. When you ventilate the prop, you slow down noticeably, so it is time to trim in.
On Mercruisers, although they have trim limit switches, IMO, trim should be set by operator. This is best done by ear, feel and speedometer. Trim her until the wheel steers easily, the RPM and speed are max.