Can I create file in the virtual file system?

Can I create the file in the virtual file system from PHP or JS?
if yes can I replace existing file?
It could be useful in case of php update process - to forward the source not the whole framework with CEF…

Yes, you can do that. See
https://www.exeoutput.com/help/phpexofunctions#exo-unpackvirtualfile
You can then overwrite the contents in the virtual file with normal fwrite PHP function.