Add a process (i.e. #stripMine, #branchMine or other) to combine tunnel and legitmine.
Mine tunnels in a pattern like so:


or, for more repeatability:

When ores are made visible, mine them and continue pattern.
Preferably, smooth mouse movements.
If possible, add auto-torching too.
This creates the most legit of legitmines. The bot can be left to afk, mining automatically in a way which isn't bannable. Branch mining mimics normal player movement.
Most code is already in place, schematics/mine/tunnel.
Something similar has already been made as a pull request, but never met checks to be implemented:
https://github.com/cabaletta/baritone/pull/877
Instead of ignored ores, have the same setting as #mine does.
this is the best idea yet!
Most helpful comment
Instead of ignored ores, have the same setting as
#minedoes.