Chaging EA/VPP by software on Intel MCS-51/8051
It depends.

Many years ago I wrote a small program to read the contents of the internal ROM by using the EA pin. The EA pin was driven inverted from a port pin, so that the external ROM was active after reset. It worked well for a mouse's microcontroller. But unfortunately I don't remember the manufacturer or the exact type.

But it didn't work with another 8051 derivative whose type I also don't remember. :-( Its data sheet had a note that the level at EA was read on reset and stored, but I read it only afterwards.

Anyway, it depends. You have to try.