I just battle around branching and clean history for a decade,
My approach is clean local commits
Git rebase head~n
Choose the ones which are meaning full
Take 5 minutes thinking about your principal message and avoid messages like : set product nullable or test cicd
Validate your work before pushing and keep a meaningful message, behind that if you are sure that commit is not merged or used by other members amen can be helpful ( but I don't recommend)
Use rebase to aligne your main streams and PRs , this is an assurance in clarity
Don't do changes without an issue or task , your boss refactor for its own sake not software, instead he can cultivate the team to write clean code