Deform a complex pattern along a 3d path, maintaining vertical
One way to do this is to use the mesh deform modifier. The modifier works similar to a lattice but will give you much better control and much smoother deformation in this case. Here's how you could go about doing this:


Use an array modifier or whatever you need to get the railing to the approximate length for the curve.
Use a cube and create a box that fits around the railing closely. Add a number of edge loops to the cube on the long edges.
Create a Base Shape key and then add a second.
Add a Mesh deform modifier to the railing and select the cube you just made. The default settings should be fine so click bind. Depending on the complexity of the meshes this may take a bit.
Select the cube and make sure you have the second Shape Key selected (not the basis one). Now go into edit mode on the cube, and make the mesh follow the curve of the stairs. The cube should now deform the railing like a lattice does. If there are any parts sticking through the cube or not moving you can unbind the modifier, make the cube a bit bigger and rebind it. All of the railing will need to be inside the box for this to work.
When you leave edit mode, because of the shape key, the mesh will snap back to the unedited state. Slide the slider to 1 and it will move back.


The reason I think a shape key will help you here is because you may need to add more edge loops to the cube or adjust the length of the railing at some point. Whenever you change the number of vertices on either object the mesh deform modifier will have to be unbound and rebound. If you didn't use a shape key you would pretty much have to remake the cube or try to reposition it back to the original shape.