You can add an Inverter to the trailer, it would not be practical to add it to the truck, the trailer is where the power is needed. I have a very similar case, I use it to power the refrigerator while we are traveling, and for extra light and convenience. I installed a 2200 Watt inverter and used tow optima red top batteries to power it. The refrigerator is a small draw item, and no problem but the AC unit is around 13 amps 120V, and will quickly drain the batteries. What I did was to install another automatic transfer switch, so the first TS has shore as it's default power and generator as the secondary. That then feeds the second TS as the main power, with UPS (battery) as the secondary. With this set-up, the transfer will always be automatic, and there will also never be a need to worry about any two systems operating at the same time, so it is safe with know chance of a back feed.
To recharge the batteries while traveling, the small 20A circuit provided by the 7-pin plug is not big enough. It would do fine if you only wanted to keep them fresh, but not if you plan on running appliances while on the go. I ran a 100A (#2) line, out of welding cable, to the rear of my truck and plug in the trailer with a 175 A quick battery connector. That then runs through a isolator and then to the batteries. The system works, but when all added up it will run about 1500. 00 to install. I use my system for small drain items, refrigerator, clocks, lights, so forth, not to run the AC. It is large enough to run the AC, and will even run my large air compressor, but it was not intended for that. Good luck in your quest.