Because you have varying heights you really only have 2 choices I can think of.
Create a morph surface in the shape of the profile you want ant then 'Tube' it along the edge.
But this profile shape is not editable and neither is the path once you have placed it.
Or use a custom profile in the railing tool.
This is the best option I think as you can edit the profile and you can edit the path of the railing.
The shorter you make the spacing between the railing nodes, the smoother it will look (because it will be a series of straight segments).
Make sure the railing connections are set to 'Direct'.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11