Nevermind, I was able to figure this out using the documentation for the update_field() function.
Examples are given on that page for inserting/updating ACF fields including the repeater and flexible content fields.
Updating with the field_key
adds all the necessary reference fields as well, so this was much easier than I thought. Thanks!