Change Data Capture in MySQL/PHP by writing to a MySQL table (rather than streaming to Kafka/Rabbit/etc)?
The most obvious solution to this would perhaps be to use triggers. You can have triggers that fire before/after inserts, deletes and updates on the table(s) in question, and then log the changes in your special table, including a time stamp and what type of write operation it was.

Another approach could be to use an audit plugin - MariaDB's audit plugin works with older versions of MySQL at least up to 5.5. MySQL has Enterprise Audit, which presumably has a proprietary licence. These plugins will log to a file, but you can set up a cron job or similar to load that into a database table.

(With MariaDB 10.3+ you would be able to use system-versioned tables which would allow you to store all changes to rows.)