Splitting yaml files , access to secrets in ESPHome subfolders

Hi, I dont think the solution of referring the base secret file from the esphome secret file is straight forward. At least I was not able to make it work the way Otto Winter suggested and how @anon11644107 has suggested here.
Please see this thread where I raised this issue and ultimately fixed it by compiling a custom version of esphome by making a simple change in the dockerfile. I know everybody may not want to compile a custom version of esphome but then i couldnt make it work any other way.