At first I thought I was seeing a flash failure type of issue so I started stripping the flash access area of my code back into smaller chunks and testing each part in smaller applications. Doing this worked without issues which seems to suggest the flash is actually healthy and code is fine too and I'm experiencing some other type of problem.
It feels like I've hit some sort of limitation around program size / available flash but I really don't know how to go about diagnosing this problem. Pretty much all of the functions throughout all of my classes are attributed with ICACHE_FLASH_ATTR - could doing this somehow be flash memory overuse and the cause of this problem?
Perhaps this type of problem sounds familiar to someone here. Does anyone know how to go about gaining an insight into what might be going on here?