Modeling this banister

I’m trying to make something similar to the decorative metal part of the banister in the first picture. Can anyone give me advice on how they would approach this? In particular I am struggling with how to make it slope down with the path of the stairs, not worried about an identical pattern.

I attempted it by making a rough pattern for my banister and using a curve modifier. It works for going around corners shown in the 2nd pic, but it does not work for the slope in pic 3.

Looking at the original I see the veritcal parts are still vertical on the slope which isn’t the case with my approach since I’m using a curve. I don’t mind my banister rotating with the slope, and wouldn’t mind it being like in the original image, but have no idea how to achieve either of them.

Thank you to anyone who has any ideas.

Using shear I have achieved my best result, but it doesn’t shear following the curve (I mean a sort of gradual shear vertically) and is pretty distorted (scaling it to scrunch it up before shearing helps but it’s guess work in terms of how much). Wondering if there is a better way?

I would be tempted to try using array on curve for that, with the rails being a profile on a curve.
This migh be of use.