A couple of recommendations:
1. save only old changed values
2. use FOR EACH STATEMENT trigger (not FOR ROW)
3. capture the context: transaction, statement etc
--
There is my solution - https://github.com/PGSuite/PGHist,
you can generate a trigger and view/copy it