If the amount of preparation is hard to estimate, you can be upfront and explain the prep is the most important part and suggest you do the prep on day rate, and give them a fixed price for the remaining painting part of the project.
The more you do the easier it is to estimate, but you never escape the potential for unforeseen problems. And there will always be clients who want a fixed price and you have to explain that you will have to price high.
To estimate the painting, find some old railing and practice at home? I am sure some pros will say you should know all your timings. True, but I can assure you, there is a huge gulf in estimating knowledge in the trade, so to improve your chances of getting a non standard item right, be a bit creative before you commit to a complete guess, which could, depending on size of contract, sink your business. (I was part of an estimating team where the building “expert” guessed a few non standard items and were £100k off the money!)
Main thing is make sure the ground is set before you start!