Earlier quoted context omitted.
SharePoint stores files as binaries in a SQL database (or a reference to an Azure Blob Store). The filesystem doesn’t come into play.
But it now has a feature to integrate seamlessly with OneDrive, linking or replicating a folder on the user machine. Hence, I expect it has the same limitations in terms of naming.
Yes, OneDrive client is restricted by the Win32 API in terms of allowable file names/path length (which is now 32k but Office doesn't respect MAX_PATH and implements its own ~250 path length limitation).