Is it OK to write to the editor of a journal requesting that you be allowed to move some parts of the paper to a supplementary file, in order to incorporate the review comments and not exceeding the normal page length? If yes, how do we write such an email?
Some journals allow supplementary material, while others do not. The first thing to do is to check whether supplementary material is routine for the journal that you are submitting to. If so, then you may not even need to write to the editor, if your planned use of supplementary material will be like many other papers in the journal.
If supplementary material does not appear to be routine, then it's entirely reasonable to write to the editor handling your paper and ask. A short and simple query is fine, much along the lines of the question here. Do this as quickly as possible, however (so that you don't end up in a last-minute panic) and be prepared that you may be told no.