I hoped to also take a train to Triberg and back but, unless I'm reading the schedule wrong, the timing of trains from Gengenbach to Triberg won't work without spending a night
Overnight?? What?
You said you had 2-3 days for day tripping. You're doing your outing to Triberg on a SEPARATE day from your outing to Titisee, right?
Beginning at 5:30 am, there are a dozen DIRECT trains from Gengenbach every day that take only about 35 - 45 minutes to reach Triberg. In between these departures there are additional trains which require a connection and only slightly more time.
The same is true for the Triberg > Gengenbach return trip.
What date are you checking? There are no schedules out yet for June 2020. Schedules are remarkably similar from year to year, so any sample date you pick for Triberg > Gengenbach ought to pick up these results, unless you've made some simple error - like including a stopover in Munich!!
This is the Black Forest Railway, one of Germany's most scenic train rides. It's super-easy to ride the train - for free - on this route, and to stop off in a couple of small, easy-to-navigate towns on the way, without anyone's help.
Here is a rail map with some of the stops shown.
What is NOT always so easy is using the DB site to get what you want.
Refresh and try your search again:
https://reiseauskunft.bahn.de/bin/query.exe/en
Want to just stay on one train all the way to Triberg? Then click on "more means of transport" under "Connections." Then use the pull-down menu on the far right (where it says "admit changes") and switch it to "direct connections." That will exclude any connecting-train journeys that might be concerning you.
The one don't-miss-it stop on this railway is Gutach Freilichtmuseum - the stop where the Open-Air Museum of the Black Forest or "Vogtsbauernhof" is located (but not shown on the map I provided above.) See photo, take from the train station platform, with museum farm building behind it - only a few steps away:
https://www.bo.de/sites/default/files/styles/688x384/public/field/image/file6ib92zwteuxuer8ad3l.jpg?itok=jS10ik9A
So to find a schedule to get there, enter "Gutach Freilichtmuseum" as your "to" station, and either Gengenbach or Triberg as your "from" station. But you should deselect "direct connections" so that you see all the possible departure times.
A visit to Triberg and the museum will likely take up most of one day.