The command line length thing can really sneak up on you and the insane way that PlatformIO $PATHs the build tree will sneak up on you and mug you. I just grabbed a single g++ invocation from a single source file in a “simple” ESP32/Arduino project of mine and it’s 46K. Now I’m on an OS that doesn’t have 8086-era limits baked into it, so this isn’t a problem for me, but I’m also not having the problem. By the the time builds 227 -I directives (yes, really) with absolute pathnames in them, they can sneak up on you.
Pity the OS dentry cache potentially scanning 226 entries for every transitive include.
It may not be the issue, but when you get advice from a knowledgable expert, try to not sound so dismissive. The age of the project is immaterial. ‘typical issue of a too long file path on Windows’ seems accurate.