In my experience, it is the intention behind the interaction rather than the absolute words that decides whether any lines have been crossed.
Simple example, at work I am surrounded by young people, mostly 'boys' who are very proud of 'flirting' with the lovely baristas in the coffee shops.
Remembering names, asking how their day went, asking after plans for weekends and holidays is routine.
I ask the same questions because the largely female baristas are lovely people and coffee is the highlight of my day. I often say on my return from holiday that I have missed them or that the only thing bringing me back from holiday was them
My point is that I say the very same words, with very different intentions. They (my young colleagues) are hoping for a spark of interest in which case they would work up to asking the barista out. I am ... buying coffee in a break from work
The boundary DH and I agreed was that we would never say, write, message etc anything that we would feel embarrassed for the other to read or see. We are involved in partner dance scenes where it can be impossible to see whether 'anything' is happening simple by seeing or reading/hearing.
All very simple and no possibility for misunderstanding.