Legacy hardware and OAuth2 (SMTP)

Any experience of migrating from “Basic Auth” to OAuth2 and if so any suggestions?
Microsoft seems to finally have killed Basic authentication and now points users to OAuth or at least I can’t find a way to re-enabled it. Some suggests to use the legacy smtp option but I can’t get that to work either, New opt-in endpoint available for SMTP AUTH clients still needing legacy TLS - Microsoft Community Hub ?

Best way IMO is to use a proxy. The client connects to the proxy, thinks it is talking to the real mail server, the proxy has the OAuth refresh token and creates new access tokens as needed, connects to the real SMTP service and auths using OAuth.

Example: GitHub - simonrob/email-oauth2-proxy: An IMAP/POP/SMTP proxy that transparently adds OAuth 2.0 authentication for email clients that don't support this method.

Thanks, I was looking at that before and wondered if anyone did it any different.