Cascading PlatformIO.ini Files as extra_configs?

I have a project which will span several boards. I have reviewed the documentation and am a bit confused about how to pull this off.

It seems like the board definition is required as a common element:

; Global data for all [env:***]
platform = espressif32
framework = espidf

In my case, I have esp8266, esp32, atmelavr, etc. so that’s not going to work. Am I trying to do something that PIO will not allow?

Secondarily, may these be cascaded? e.g. platformio.ini has an extra_configs section, and each board has it’s own separate extra_configs? The reason I want to do this is right now I have a config.h file with a TON of declarations. Adding new boards makes that even messier. If I could somehow cascade the declaration configuration file with a build_flags specific to each board, that would be easier to maintain.