What tickets you need in Germany I am unable to say.
Arriving from Germany, the Swiss Travel Pass is valid from Basel Bad station. Your Swiss Travel Pass must be valid at border crossing, that’s all.
There is only one direct service per day from Germany to Lucerne, the EC 151. Otherwise you are required to change trains at Basel SBB station. There are two direct services per hour bound for Lucerne from Basel SBB station.
Use the SBB Mobile app for public transport schedules in Switzerland.
I wish you a good journey,