Nope It is not okay to do that.
Because that process is too much risky, Your device may stop working completely and may not ever be fixed.
Secondly may be you won't get any Official software update from Samsung afterwards unless you flash your phone with its original Stock ROM.
If this solved/helped with your query "Accept as solution" will be appreciated.