I'm trying to stream changes to tables such as Accounts to a handler that will update our data warehouse. I tried pushtopics but ran into limitations in query size and longtext fields, so now I'm trying platform events. My cometd client is able to receive events that I publish to my platform event (as in this example) but I want to automate the process, and I can't seem to find any code where people have done this. Everything I see about triggers seems to be using triggers to subscribe to a platform event, instead of using them to publish events.
How do I automate the process of publishing platform events? Does my strategy here make sense?