I usually counsel against powergaming for combat effectiveness, but this is because irl I tend to play games that are a little heavier on the roleplay and exploration, rather than combat, and by putting more of your effort into combat effectiveness you run the risk of neglecting what will actually be the focus of the game. I've played games with people that have built characters against type (one notable character was a halfling Barbarian, that is still to this day, one of the best barbarians I've ever seen), or even given their characters actual disadvantages for roleplay reasons and these groups usually get along in combat fine unless it's a particularly deadly encounter. Teamwork and action economy are powerful things, even if your group isn't optimised for combat.
But, having said that, if i were to play a more hack and slash style of game, where combat was the majority of the focus instead of exploration or roleplay, or even a solo hack and slash game, I would probably say you should minmax that character to your heart's content.
So far I've only participated in one game where combat was the main focus, and it was a charity event game, where people were encouraged to donate money to get things like magic items and extra stat boosts, and the combat was pretty harsh, but I spent my money on a golden canary to save our arses

But even then, I still ended up making what was probably a character better suited for RP than combat (because it was an artificer), because I can't help myself, and the best part of making a character is making their little story.