I’m surprised it’s not already in place for rail freight. Pre-defined, well known routes, automatic right-of-way. You’d need some exception detection - spot things on the line or if any part of the train is behaving abnormally, but like cars you can “fail safe” - do an emergency stop if the computer or a remote operator decides that something has gone sufficiently wrong which you can’t do in a plane
Most likely outcome (assuming you make it to Iran) is they make a big show of congratulating you and setting you up with a super lavish lifestyle that is totally not a compound that you are definitely allowed to leave if you want but why would you want to with all the people trying to kill you