Reduce Logging in OH3

yes, it can be done from within a rule.
Example of running a console command from within a rule can be found here: Bash script execution from rule
For your use that echo command needs to be adapted.