It should be possible Ulco. The method posted earlier in the thread was really a response to DandelO, tbh I've not looked at how you've been generating your railroad (I did see your thread and images and think you've found a very convincing way).
As for your railway sleepers, I didn't realise you were using a sin function. Rather than warp the sin output, can you not displace it or move it laterally with the perlin noise directly? You could even just mask a continuos sleeper pattern that runs north-south by the road mask. I would doubt you'd be able to bend the direction the sleaper's facing this way, (they would always run east-west). Maybe you use your previous method, and just mask it?
Btw, Volker and I have found a new way of generating level roads, which samples several altitudes before and after the generation point, and smooths out the road along it's length, that also keeps a consistant level along it's width. Unfortunately both him and I are tied up with work commitments over the next few days to put much more time into this new method.