Well there are many ways you can do this I’m sure, but the way I would do it is like this.
First I would make one segment of the fence pattern like this. It is fairly simple to make.
I would then add a bezier circle. Add a curve deform modifier to the fence pattern then select the bezier circle as the curve target. Adjust the axis until the fence deforms properly. After that, play with the array count until it raps around the circle. If you still have a small gap, play with the circle scale to close it off.
After this, apply the array modifier and curve modifier. Then add a lattice and add a lattice deform modifier to the fence mesh. You can increase the subdivisions in the lattice for more control. With the lattice, you can create all those deformations in the fence mesh.