Whom did this happen to? 发生 and friends in sentence
Is the second translation more accurate?

Yes, it is.

Does 发生 really take location complements? I only know of phrases like 发生了事故, where there is no location complement.

The entire phrase: '发生在...的' is an adjectival phrase for the noun '事故'. '在' is the location complement. '的' is the adjectival suffix. (not possessive particle in this context)
(发生 is a verb, so it does take location complement 在)

Is the following reasoning correct?
在我公司发生了事故 is ambiguous as it can mean either &quot;an accident has happened at my company&quot; or &quot;an accident that has happened at my company&quot;

It can only mean &quot;an accident has happened at my company&quot;; to mean &quot;an accident that has happened at my company&quot; you need to write &quot;在我公司发生的事故&quot; (了 is optional)

The ambiguity is there because of a lack of a classifier 一件 or possessive particle 的.

There is no ambiguity, without adjectival suffix 的, &quot;在我公司发生了事故&quot; can only mean &quot;an accident has happened at my company&quot;

Clarity can be achieved by adding them, like so
在我公司发生了一件事故 - an accident has happened at my company
一件在我公司发生了的事故 - an accident that has happened at my company

It is correct

的 in the second sentence is optional.

In the second sentence, '的' cannot be omitted: only '了' is optional

If (2) is true, can I move 在我公司 after 发生了 in (3) without changing the meaning?

Yes, you can. The following are both correct as long as the adjectival suffix 的 is present at the end to indicate '[在我公司][发生]'or '[发生][在我公司]' is an adjectival phrase
一件在我公司发生的事故 = 一件发生在我公司的事故