Yeap, you can use tmdb ids (I use them for everything) but not as you outlined. They need to use this type of format …
The Office (2001) {tmdb-2996}
The Office (2005) {tmdb-2316}
The id needs to preceded by tmdb- and it needs to be within {} brackets. The () is optional but I use it myself for my libraries. Plex does not use season ids to my knowledge only at the show or movie level.
I’m a software engineer and I’ve been a streaming site, complete with databases and other layers. It’s a whole system that I’ve build and it relies on this folder structure. I also built a tool that calls the TMDB API and gives me series and episode data.
Ah! Gotcha! That’s pretty interesting and in that context makes sense.
Two pieces of software that come to mind - but based on your use you’re probably beyond them - are FileBot and Jellyfin. If you weren’t already aware of them they might be worth checking.
FileBot is a pretty comprehensive media renaming\matching software that has automation and CLI functionality that might be worth tapping as it can do the “plex friendly” naming including TMDB references … might be useful as reference at least for ideas for your own naming automation.
You might also look at Jellyfin for a media center as it is open source and more customization friendly. It’s pretty popular with more tech savvy folks (Plex is very consumer friendly) and as a software engineer you might find it more flexible for your setup.