A few thoughts to add to the other posts.....
A rail pass is rarely a good value in Italy, especially as they don't include the compulsory seat reservations on the express trains. You'd have to buy those separately "out-of-pocket". The reservations are specific to train, date and departure time so can only be used on the one train listed on the ticket. Those caught without a valid reservation for the train they're riding on face hefty fines which are usually paid on the spot!
The question of a rail pass in Switzerland is more complicated. Whether it will be good value or not depends on exactly which rail trips you'll be taking there, so it's often necessary to work out the P-P cost for each trip and then compare that with the cost of the pass (often a daunting task). If you're going to be spending most of your time in the Berner Oberland, the BO Regional Pass may work well for you - https://www.regionalpass-berneroberland.ch/en/ .
There's lots to see in Lucerne so you may want to spend three nights there. You could travel to Mt. Pilatus via boat to Alpnach, the Funicular to the top and then cable car down on the other side and bus back to Lucerne. There's also Mt. Rigi and of course the city of Lucerne. As others have mentioned, you can take the train from Lucerne direct to Zürich airport in just over an hour.
IMO, you may want to skip Lago di Como as that will take time away from your time in Switzerland. Travel to and from Lake Como wiill require about a full day.