Hello Chinthika
No, it is my mistake, I only looked up the schedule for EC312 instead of your itinerary.
Direct trains from Milan to Lucerne no longer exist, unfortunately.
Due to construction works, you have to change twice on that weekend. Or use the replacement bus from Arth Goldau to Lucerne. Usually, there are direct trains service from Arth Goldau to Lucerne, yet not on 22 May as the line is closed for maintenance. Buses will operate.
I, personally, would opt for the RE80 train at 7:43 from Milan and change in Lugano for the direct IC21 service to Lucerne. Working as a ticket inspector on that line, also on the EC trains, I can tell you, using the RE80 and IC21 will mean a much more relaxed travel. Fewer people, fewer crowds, less stress. And this connection is even faster than changing twice with the EC. Going by RE80 means, you would need a ticket from Milan to Chiasso. From there, the Swiss Travel Pass is valid even though you change trains in Lugano. The Swiss Travel Pass allows using any train once you crossed the border to Switzerland, as @Krist correctly advised.
If you already purchased the tickets for EC312, there is no possibility to use the RE80 trains; EC tickets are not valid on the RE80 trains in Italy.
Kind regards,
Roland