I've got the perfect camera for you. It plugs into your computer with a USB cable, and you record to your computer using free OBS software (or stream if you want to). I tested about 20 cameras in my other thread. I didn't follow up with this one yet in that thread, as I had too much going on to make a review, but it's the best one. This one is for the typical end rail position, not the direct overhead position. (I have one for that too).
It's all manual control, which is better for pool. There is no hunting of the autofocus and auto white balance that most cameras today have, which causes the picture to change when someone walks in front of the camera. I'm sure you've seen this effect on many streams.
This one. Make sure to get the 6-12mm version. If you have about 12" of backstroke room to your wall on a 9' table, this will work great. There is no sound, you will need a separate microphone, which can also plug into your computer with USB and is controlled by the OBS software.
Link:
Screenshot:
View attachment 847855