Can I connect a heating element to a solar panel to heat a hot tub
I apologize. I did not read everything. It is really stupid to use photovoltaics (PV) to heat water. The reason is that you will, at best, convert 20% of incident sunlight into heat.

But a solar hot water heater may approach 80% or 90% efficiency, even for crude do-it-yourself (DIY) panels.

My suggestion is to build a simple hot water panel using black irrigation tubing. Coil several hundred feet of tubing on a piece of plywood. Put a pane of glass over it if you like. Keep that in the sun. Get one small PV panel to run a small 12V pump that pumps water through the tubing when the sun shines. This will probably not heat the hot tub all the way up to usable temperature unless you put a bunch of them in series. But it will make it will raise the baseline temperature noticeably.

Maybe a bait circulation pump or something like that will do the job. You don't need a battery. There is no point in running the pump when the sun is not shining.

Thanks to peufeu for pointing out that hot tubs (spas) are a potential risk area for Legionnaires' disease. This type of heating could possibly raise the risk a bit because the water may never be heated hot enough for long enough to kill the bacteria responsible. Conventional mains powered electric heating may be hot enough to flash kill the bacteria. In either case, keeping the water chlorinated is advised to minimize risk.