Speaking of, the top piece (railing) of Trex is nailed into the top of each post, and I can’t “unscrew” it or otherwise dislodge it easily.
…
The nails are well countersunk, large finish nails so far as I can tell, so very little head to grab on to.
An even larger finish nail, with the point ground off, could be used as a big nail set to drive the existing nail all the way through the top rail.
Hollow screw extractors could be used to remove the wood around the head of the finish nail until a vise-grip can grab it, then the vise-grip provide a basis for levering it out with a wonder bar.
https://www.rockler.com/screw-extractor
…Trex handrail on top.
… but the topmost rail (Trex) is sagging between every post, plus or minus 1/4”, which is quite noticeable.
It sounds like the top rail is made - improvised - from Trex decking. On their web site the only railing system I found was made of aluminum.