My question is about passive voice for intransitive verbs like "go". "A great deal of trouble was gone through to ensure their safety" is the correct sentence in prepositional passive form.
Not quite sure what you are asking. If it is whether your example is grammatically correct, then I would say it is. If I were writing it I might prefer to use "to" rather than "through", because generally someone "goes to a lot of trouble". If you wanted advice on whether to use such a sentence, then as a matter of personal preference I would say it is bad style. As @user159691 has pointed out the sentence is not easy to read. What is the main point being made? The passive voice has its place, of course. In your example, its use suggests that the main point is that trouble had been taken (or gone through or gone to) and that the issue of who had taken that trouble was not important. That seems unlikely to be true. For the same reason official language favours the passive voice, because officials seem to like to be vague about exactly who was responsible for things. (I know; I was one myself.)
To go through means "to endure, to suffer, to experience".
The collocation go through (a lot of) trouble is normally used in contexts where the speaker is emphasizing someone's efforts:
Your uncle went through a lot of trouble to get you that interview. You shouldn't treat it so casually.
and so it is a little peculiar to find it used in a passive construction which removes that someone from the picture:
A lot of trouble was gone through to get you that interview.
It's grammatical, and it's not impossible that leaving uncle out of the picture is deliberate. It could make the recrimination either milder or more stinging. The effect of the passive construction would depend on the people involved.
P.S. There is also the collocation go to (a lot of) trouble which means essentially the same thing.