As long as it's schedule 40 pvc, you shouldn't have issues with its strength. But you might not be able to tell if it's not marked on it.
Yeah, getting the rail attached is a bitch with rails like that. You have the idea mostly, but will probably have to add some more support. try making some small wedges you can put on both side between the side of the pvc and the board you're attaching it to. It will keep it from moving side to side.