I have no doubt people have had locks break, along with just about everything else. I replaced mine with a vintage duplicate (but not broken). Not cheap, but fits perfectly.
A lot of the vintage trailers used locks of a shape where new replacements do not fit. Of course, I have no idea whether your trailer is vintage or not. Newer trailer, just get a replacement.