Your neighbor isn't totally wrong, but it's a bit more nuanced than that. Portuguese law requires any registered vehicle (including trailers) to be in safe condition, but there's an important distinction: if the trailer is stationary and has no active registration, or if you never use it on public roads, enforcement is much less likely. The GNR or police aren't going around inspecting garages looking for damaged trailers - the real risk is getting fined if you drive with it or if it's spotted hitched to your car during a traffic stop.
Where things get tricky is if the trailer is still registered and has a valid inspection. If it has an expired ITV or if safety conditions are compromised (broken lights, structural damage, etc.), technically you can be fined even if you don't use it. The safest thing is to check what exactly is damaged: if it's something minor (a light, a mirror), it's worth fixing; if it's structural, maybe it's time to take it off official circulation or sort out the situation with the motor authority.
In short, the risk of a fine increases if someone sees the trailer hitched up or if you're caught during a traffic check, not just from it sitting in the garage. But if you're unsure about the legal status of yours, it's worth confirming directly with the insurance institute or the traffic authority - it's 5 minutes and problem solved.