Some people call this genre rational fiction. Personally I really liked Harry Potter: Methods of Rationality. The MC was super narcissistic and nitpicky, a true engineer. For example he was often looking for ways to create perpetual motion machines / infinite energy with magic.
I love rational fiction. Yes to Methods of Rationality, Mother of Learning, and also Paranoid Mage and a few others, including Majority by Abby Goldsmith.