Is Overwriting the PFILE with the database on dangerous?
Why do you need it? pfile is read only once when database starts.
Use spfile and alter system set parameter = value scope=memoryor alter system set parameter = value scope=both.