1. The problem is, of course, the Institute doesn't let you make peace with the Railroad. There's a price for being Director of the Institute and that's murdering Glory, Doctor Carrington, Desdemonna, Deacon, and Tinker Tom. People who have spent their entire lives doing their best to save Synths at considerable cost to their family, friends, and children.
Deacon if you get your approval high enough talks about how the Institute finds members of the Railroad. They identify them during encounters, recover the memories from destroyed Synths, then track down their families and torture them until they reveal their location. This is, of course, the Courser and Slave-Hunting Division of the Institute which is one of the most evil branches of the Institute but you become Director by proving yourself capable of destroying the Railroad.
In the words of Magneto, peace was never an option.
2. The Railroad questline ends on a surprisingly optimistic note for the Synths of the Institute as you can evacuate the entirety of the Synths living in the Institute as you manage to arm them for an internal revolt. They seize all of the teleporters out of the Institute and proceed to evacuate the Institute before it gets blown to pieces. You can also sound the evacuation order for the rest of the Institute afterward if you want as well.
The Railraod questline basically has you encouraged to infiltrate the Institute because, "We've saved hundreds of Synths over the years. Now let's save them all."
3. I'm kind of surprised so many people don't understand why the 3rd generation Synths exist. The game repeats their purpose numerous times but I get the idea a lot of fans want it to be more than it. Why did they make 3rd generation Synths? To infiltrate the Commonwealth and replace people. 2nd generation Synths don't look human with their rubber skin. In order to successfully infiltrate the Commonwealth for long term periods, they need to be able to eat, drink, have six, and mimic human behavior of the people they're replacing.
That's why they exist. No big transhumanist plots or anything.
To build an infiltrator robot. The fact they also use them for cleaning garbage and as household servants in the Institute is because the technology shouldn't go to waste.