Here is what you should do. Take the covers off your trailer lights and look at the bulb. Inside the bulb there will be a thick filament, and a thin filament.
When you are trying to brake or turn, the power comes to the thick filament, and hopefully glows brightly and goes through it and returns on the ground wire from that bulb.
When the bulb glows dimly, and you take the cover off you will likely find that the thick filament is glowing very faintly, and now the thin filament is glowing dimly. The reason for this is because the ground from that bulb is not connected to the trailer and back to battery ground. The power comes in to the thick bulb filament, can't get out on the ground, so it tries to exit from the other filament, the thin one. When this happens, the power usually goes to another thin filament on the other side, and it glows dimly too.
The three filaments are now in series, and in a series circuit the most resistive and the thinnest bulb filament drops the most voltage, and will therefore glow brighter than the thick one.
To prove this is indeed the case if you can see both filaments glowing like I said, connect a good ground from a connected jumper cable to the case of the bulb and see if the bulb starts working properly.
Then fix the ground connection.