The answer is a battery tender, not a trickle charger. A trickle charger will just charge and charge regardless but a battery tender only delivers as much charge as necessary and then shuts off. I have 5 cars, a pickup, and a tractor, including 2 classics that sit for 7 months out of the year and a couple of German cars with lots of electronics that love to draw down the power while the car sits. I keep battery tenders on most of them. Thanks to the battery tender, my oldest battery (in a '74 Porsche) is 13 years old and still going strong.
https://www.harborfreight.com/12-volt-deluxe-battery-maintainer-and-float-charger-62813.html