If Network Rail is struggling to adequately maintain some of its stations I'm not sure how it can be expected to maintain station master residences. Even as far back as the mid 50's such properties were already falling into a state of disrepair and costing BR a lot of money to fix!
As an aside, I've seen pictures which were taken of the interior of a railway cottage on the S&C in around 1980 shortly before it was sold by BR. Even 30 years a go it could have hardly been described as desirable!
Why would the rental income from these residential buildings be too low to cover their construction and maintenance just because they belong to the railway?
A rule of thumb for residential builds is that land costs a good 1/3 of the price of the dwelling you build on it. Given that the land and some of the buildings I am talking about are "free" (i.e. sitting there doing little or nothing except requiring maintenance), the railway should stand to make a handsome profit by building homes on them and renting them out.
Now, lets add the constraint that for practical and legal reasons, it would likely suit the railway to restrict occupancy of said buildings to employees of the railway. How much of a discount below market rate would a railway employee require to take up the on-site accommodation? Would it really be such a discount as to eliminate any profit for the railway?
The railway employee could rent for cash (on income that had been taxed) or they could trade the accommodation for labour in kind (which also attracts taxes).
Alternatively, if the railway requires certain categories of its employees to occupy accommodation at their place of work, and this is genuinely of benefit to the employer for, say, security reasons, then this constitutes tied accommodation. It is not taxed as an in-kind benefit, which means that the employee and the employer avoid the NICs and income tax on the value of the accommodation (assuming that the net cost of the accommodation is implicitly deducted from the wages of the employee).
This means that the in-kind rent paid by the employee comes out effectively way below market rate, as much as 50% below it would seem.
The railway lowers its costs and its taxes by paying part of its wage bill in kind by providing staff accommodation that was otherwise just empty ground or old buildings rotting into the ground. They also get railway personnel on site and on call (subject to proper rostas and union assent) to help deal with emergencies and provide a background level of security simply by virtue of the place being occupied 24/7.
The employee also avoids taxes and gets a much nicer house than they could have afforded if they had to receive the necessary income through their paycheck, plus they get a really short commute.
What's not to like? Well, assuming all "station masters" are on a standard pay grade, you probably have to pay them all the same salary whether or not they get accommodation, otherwise the exchequer hits you for in-kind benefits again. Thats the tricky bit. Creating a pay grade that comes with the house without getting caught out if there are not enough houses to go around.
But you could still rent the accommodation to railway employees and make some money that way.
Caught between the exchequer and the unions... someone needs to get creative about the politics of that one!