The first one is the night train coming from Amsterdam. It could be busy but there are plenty of 2nd class carriages. However this train is very often delayed : have at least 1h margin in Basel.
Reservations not needed within Switzerland. Plenty of seats, simply go to train ends (always less busy as people are lazy and board in the middle next to the stairs).
Geneva - Lyon : reservations not possible whether you’ve got a pass or a ticket. Train could get busy but as long as you show up early it’s fine. You have to go through a customs area to access the French tracks : checks are random but allow some time.
Do you have to start the journey at 2am ? Honestly I wouldn’t recommend Frankfurt station at that time. You’ll have a better experience leaving at 6-7am.