For a trip in June, please advise if it would be feasible to depart from Paris, travel to Versailles (how?), leave a suitcase at the station, tour Versailles, and then retrieve said suitcase and travel onward to Chartres.
Too much for one day?
The travel is indeed possible on the local TER that goes from Paris Montparnasse to Chartres. (sometimes the terminus is Chartres, sometimes Nogent-le-Rotrou, usually Le Mans). Luggage storage, I don't believe that is possible.
The trip is possible and easy except for the luggage piece. It is a very efficient way of traveling to those sights because you eliminate "backtracking". You can see if there is luggage storage at Versailles. If not there are apps that will find a place to store your luggage. Kind of like AirBnB for luggage. One is called Bounce, I have no experience with it.
It does look like Bounce has several options.
Quick note re stations in Versailles. The usual route to Versailles from Paris that guides will recommend is by the RER Line C from various places in central Paris to Versailles Rive Gauche - Chateau de Versailles which is very close to the chateau but is a terminus. The trains on the Paris - Versailles - Chartres route leave from Gare Montparnasse in Paris and call in Versailles at Versailles Chantiers station which is the through station but is over a mile from the chateau. It's up to you whether you want to go to Rive Gauche first, visit the chateau and go to Chantiers, or just use Chantiers. Neither of them have left luggage facilities.