A solar panel as a maintainer is a good idea for a trailer that sits outside, but as you know 1/2A won't actually charge it from a low state. 20 watts is 20/12=1.67 amps which might charge a battery but it's minimal. One way to know is if you hook it up and see it ever gets to a voltage higher than 13.2v. At 13.2 at least it's charging, but slow. And if you measure the amps going in you can know "something".
This is not really a suggestion but more of an illustration as to how much effort you'd have to throw at it to charge the battery thru the 7-pin. It can be done. Could be useful for a guy who can't park a dump trailer near 120v.
To charge the battery while driving you would have to significantly increase the wire size to your 7-pin. You will need to add 2/0 AWG wire, which is huge, more than 1/2" diameter ( ! ,,,,like a winch cable ! ) . And you need to increase the capacity on the trailer side too. Piggyback bigger wire wherever you can and you will get more amps at the end. I think you can get something like 40A thru one of the pins on a 7-pin connector that would give it a hot shot while you are towing. An 80Ah battery will (ideally) charge in 2 hours (if it can accept 40A but of course its never that simple). Here's the some info from
etrailer.com. If you don't increase the wire size (a lot), the normal trailer wiring will only "maintain" the battery because of the distance (~20 feet). To ----charge---- the battery you will have to use 2AWG to reduce the losses over the "distance".
Lets say your trailer battery is 20 feet from your Truck battery, which may charge at 14v. If you can get 18 feet of 2/0 AWG and 2 feet of 10awg your (40A) voltage drop from 14v will be .11v from the 18 feet of 2/0AWG and .16v from the 2ft of 10AWG leaving about (14-.11-.16=) 13.73v for charging, which is not bad. The pins on your 7-pin trailer plug need to be "clean" and make a good connection.
You don't have to remove the black wire from the trailer circuit, you can add this large 2ga wire in parallel where the current flows thru both the 10ga trailer wire AND the 2/0 cable.
A simple way to get some charge to a low trailer battery is to connect battery jumper cables to the trailer and idle the truck for 15 minutes or as long as you can. 1) Good clean connections; 2) larger jumper cable wire; and 3) shorter jumper cables will all increase the amount of amps that enter the trailer battery within the time alotted.