So what you want to do is configure routing over Tor.
Check out this article I wrote. It has the steps to create a WiFi hotspot that routes everything out over Tor. If you added another ethernet adaptor, you could edit the configuration so that interface would be your gateway for incoming traffic on the LAN and traffic would route out over Tor. Also check torbox.ch for the scripts and config info.
https://thesmashy.medium.com/lets-build-a-torbox-and-send-everything-over-tor-5007fad92f46