I recently came across some interesting research by the US DoD into optimal caffeine consumption for alertness based on an algorithm they were developing. I can't quite recall the details, but you can find a web version of the tool here: https://2b-alert-web.bhsai.org/
Anyhow, as I recall (and I could be wrong), you actually want to start low and end high. Obviously decaf in the evening may still be good though, given you want to be able to sleep without detriment.