No I don’t recommend exiting same day your stamp expires because there could be unforeseen travel issues. If you attended an actual school you need the letter saying you have completed the program and bring that to immigration first and then exit to go apply for your Non-O. You can search this page for what the most recent requirements are based on which embassy you apply at. Also, check the embassy’s website for the current list.
I had an issue trying to switch from ED to Non-O marriage within country in 2022. You have to cancel the ED visa before exiting as well. Not sure if things have changed since then. You can apply for the Non-O visa in a neighboring country like Laos.
Your passport has not been stolen hence you do not need a police report. Ask the immigration office near you for the 30 day extension early based on needing to renew passport. They may or may not do it. Then follow all of the steps listed on the U.S. Embassy Thailand website for mailing in to renew. Including the step where you have to purchase the courier mail back envelope on the Thai post website for 100 baht before mailing your application as you need to include the receipt. Use a built in translator for this website. Then you will wait 3-6 weeks for the U.S. Department of State to send your new passport by mail. Sometimes they are fast, sometimes they have a lot to process. Then once it arrives you must have all of your Thailand immigration stamps transferred from the old passport to the new one.
If you already have an approved tourist visa then you should be fine..might as well see Penang island for a night or two though if you go down there (I love the street art / galleries). People who say things are tricky are most likely talking about using too many visa exemptions. That would be my guess.