Some time ago I wanted to do a couple of video clips of the carpet empire to share with family. My first attempt was using what was available,.. added some weight and rubber banded my cell phone to the back of a passenger car. The results were good since cell phones have really nice cameras. Only problem was it couldn't fit through the bridges and tunnels due to height. My next was using a small handheld video camera with a mount made to sit on a flat car,.. this could be pushed by the train and fit through the tunnels but I like a view where I can see the train. My daughter gave me a 90degree periscope adapter for the cell phone (cheap) but still a bridge clearance problem.
My final solution came at a RC hobby shop where they have high quality video cameras in very small packages. Look at some of the FPV used for racing and flying, there are many types that come in component levels. A tiny camera lens unit (or several) can be placed anywhere and wired to the a control unit that records, broadcasts, takes still shots, etc,.. For my purposes I just obtained a RunCam2 4k version which is fully self contained and only 3/4 inch high. Using their app I can live stream the view to my phone. I paid $100 for the camera which I could have obtained for 70 or 80 online, but anytime I can I fully support the local shops.