As an engineer paid in a foreign currency, what is the best strategy to
maximize your income? Is it better to exchange when you receive your money on a
monthly basis? Or is it better to exchange a little bit every week or every
day?

TLDR; The daily exchange provides the best results over time on the
assumption that the exchange fees are proportional to the exchanged amount.

First, let's grab the USD/BRL prices from Yahoo Finance. I'll use
pandas_datareader and yfinance.

Let S be your annual salary, n be the number of exchanges
and (x_{1}, x_{2}, ... x_{n}) the USD/BRL
exchange rate at the n periods.
$\frac{S}{n}$ is the exchanged amount at each
period.
The total exchanged amount is:
$$\frac{S}{n}\sum _{i=1}^{n}{x}_{i}=S\sum _{i=1}^{n}\frac{{x}_{i}}{n}=S\stackrel{\u0305}{x}$$

Let m be another number of exchanges and (y_{1},
y_{2}, ... y_{m}) the USD/BRL exchange rate at the
m periods. The frequency yielding the optimal exchanged amount is the
one with the highest average:
$$S\stackrel{\u0305}{x}\ge S\stackrel{\u0305}{y}\iff \stackrel{\u0305}{x}\ge \stackrel{\u0305}{y}$$

To determine the best frequency for currency exchange, we'll compare
averages from three datasets: daily rates, weekly rates, and monthly rates.

Over time, the daily exchange will give you the best result, but it doesn't
mean that it is always the case. The weekly exchange yields better results if we
only take data starting from 2022.

But if we start from 2020, then the daily exchange is best again.

Flat exchange fees

Our calculations assume exchange fees are proportional to the exchanged
amount A. However, if there's a set fee F for each exchange,
the ideal strategy will be influenced by both F and A.
Intuitively, a R$1 fee is trivial if you earn R$1M/month.

Using S and (x_{1}, x_{2}, ...
x_{n}) the exchanged amount becomes
$S\stackrel{\u0305}{x}-nF$.

Once again, let's see which exchange frequency yields the most total amount:
$$S\stackrel{\u0305}{x}-nF\ge S\stackrel{\u0305}{y}-mF\iff S(\stackrel{\u0305}{x}-\stackrel{\u0305}{y})\ge (n-m)F\iff S\ge \frac{n-m}{\stackrel{\u0305}{x}-\stackrel{\u0305}{y}}F$$

To benefit from
daily exchanges in 2022, your yearly salary should be around 32,000 times the
flat fee. For weekly exchanges, it should be around 4,500 times the fee.