Automating Unique Customer Name Generation for Walk-In Customers in ERPNext

You can try using this
https://docs.frappe.io/framework/user/en/api/document#frapperename_doc

Regarding the naming series solution, I think the naming rule doctype can achieve a similar result check this