For the Oracle side, consider defining the id field as an identity column, and setting it to auto-generate (introduced in Oracle Database 12c).
This has the effect of populating the id field on the database side, without needing to define a database sequence:
id number generated always as identity primary key
This article also has some good information about using identity columns in Oracle Database: https://oracle-base.com/articles/12c/identity-columns-in-oracle-12cr1
This can give you a good alternative to sequences and triggers. Hope this helps!