The solution from WackFiend should work and isn't wrong, but I personally found this to be more effective (not mine, so no credit claimed, but it was helpful). It requires a lot less back track than the solution on Playstationtrophies.org so probably more helpful to minimise repeat play time given the level 50 trophy also takes a bit of work.
The other important thing I did (not sure if required) was to avoid engaging in conflict in the Battle of Bunker Hill, where basically everyone is shooting everyone. If it's not marked as red on your map and attacking you, don't attack it (lest you turn that faction hostile). You can get through the entirety of this battle whilst only shooting two turrets within the base by walking to the objective.
You may need to pass a couple of speech checks at certain points, can't remember if/where though.