These are all valid questions since I don’t think they are covered by the rules. My best guess:
As long as you own one of the border territories, you could build it. I don’t see a rule that says you need to own both sides of the border.
For the same reason, anybody who owns one side should be able to repair the damaged railway.
The USSR national reference sheet regarding Scorched Earth says it « Can destroy its own facilities during the Combat Phase of its turn. No land unit is required ». You could say that what’s on the border is not « your own », but in real life, you could destroy the rails on your side of the border with the same result. Not sure what makes more sense here.
Note that since rails are used only in the non-combat strategical rail movement (rule 10.4 of v.3) on a territory that you owned since the beginning of the run, these are not issues that come up very often. If the enemy is across the border, he is coming during the combat move only.