Yes the UPS works well as a trickle charger.
One issue is that if you connect the fully charged battery to a lower charge battery, you can get a high current flow. This could exceed the capability of thin wires…
If you want to connect two batteries, use really heavy duty cable, like automobile starter leads to connect them. Then you can add the trickle charger lead onto the pair after that.