Use more CSS variables in custom SASS. Check what BS is doing here.
For 2.x consider using/changing where it make sense and will not make too much problems with upgrading custom theme code.
Candidates
Check all :root CSS vars that BS5 is setting in bootstrap/scss/_root.scss.
Instead of custom buttons approach BS5 buttons now are using nice button-variant mixin where we can control all colors we could not control before. Additionally BS5 have a lot of button variants out of the box, including outline buttons - for example our custom ghost button can be btn-outline-primary or btn-outline-dark.