You held H-1 visa at one point and are now applying for F-1 visa. So that could raise the question, that you at one point of time planned to work in US and have immigration intent. Your intent may have changed now, but you should be clear how to explain the same to USCIS or consulate officer.
Yes, better option is to get COS done in US and then go for stamping when the need arises. If you have no need to leave US, then no need to go for F-1 visa stamping.
Your new H-1 can be filed as a cap-exempt using copy of previously approved petition. So no need to go through cap again. Downside is that your new H-1 will be valid for 6 years minus time already spent inside US on H-1
If you want to go cap-subject route to reset the clock, then you need to stay outside US for more than 1 year before filing the petition.