According to this page https://shulchanaruchharav.com/halacha/extending-greetings-to-a-woman/ "see Maharam Shick E.H. 53 that is Mailameid Zechus on all forms of greetings of formality." Can someone who knows how to read Hebrew please look at this Maharam Schick https://hebrewbooks.org/pdfpager.aspx?req=1494&st=&pgnum=308&hilite and translate where he says this? It's probably in the last paragraph or thereabouts in that teshuva. Would Maharam Schick also be melamed zechus on saying "shalom alechem" or "shalom alecha" to a woman?
Maharam Schick justifies the common custom to greet women based on two considerations:
It is permitted due to the greeter’s intention being for the sake of heaven (לשם שמים).
Commonplace actions which do not lead to improper thoughts or behaviors are permitted.
He does not seem to discuss the precise wording involved; presumably any sort of greeting would be justified by this approach.