Welcome to the forum.
Good luck w/ your new boat.
The symptoms sound to me like the main DC power distribution (thick red and thick black wires) has a poor connection, causing a voltage drop to the problematic devices when a high current draw, such as from the trim motor, sucks up most of the power.
If this were mine, then I would use a high current load, such as from a carbon pile load, to draw lots of current from the battery, such as around 10A DC, then use a DC voltage meter to determine / verify if any abnormal voltage drops exist at any connection, to pinpoint the problem.
Another "shotgun" approach is to first remove the cables from all battery negative terminals, then to sequentially disassemble, inspect, clean, properly assemble, properly tighten, then properly insulate each of the thick red and black cables, such as with liquid electrical tape, from the battery through each of the connections on the boat.