Edit Bonita Portal
As you said the theme of Bonita Portal is defined by a file stored in Bonita Engine database.
You can try to connect to the Engine database, get the theme content, edit it and upload it back to the Engine database and restart Bonita application server. But all this process is not something official supported in Bonita Community Edition and I would highly discourage direct edition in Bonita Engine database. In fact direct edit in Engine database can lead to inconsistencies as it is part of the Engine job to make coherent update in the database.
Editable Bonita Portal theme is a feature that is part (among many others) of Bonita Enterprise Edition.