My advice is to be flexible in your dates to go up mountains, you need good weather. If the forecast is cloud, switch days around so you keep the good days for mountains.
Titlis and the boat ride could be a full day each. You can get a boat to the far end of the lake (Flüelen) and get a train back.
Luzern old town deserves more than the second half of your arrival afternoon.
Doing the Jungfrau as a day trip from Luzern may not be possible unless you start really early. It takes a number of hours to get even to the foot of the mountain from Luzern.
Look up times on the SBB website: https://www.sbb.ch/en
A possible solution is to stay the last 2 nights in a location at the bottom of the Jungfrau (Mürren, Wengen, Lauterbrunnen or Grindelwald), and head north to Germany directly from there.
see this website: https://jungfrauregion.swiss/en/summer/
The Glacier Express route is nowhere near Luzern. It runs east-west through the Alps well south of Luzern. You would be needing to do a circuit with overnight stops to do that route.
The rail route from Luzern to the Jungfrau region (via Interlaken) is scenic and a good substitute.
Finally, you are doing this by rail I assume?