Customising a custom rom
Depends on how the ROM is packaged and what you change in it before repacking. You should be able to unpack and make edits using suitable tools for unpacking the ROM.

A better option is to first flash it, then root and make your changes in the files as needed :-)

And yeah it can brick the device if you flash bad code