Welcome. My name is ***** ***** would be glad to assist.
The fan must have a box for support, so not sure how you plan on adding the board.
But, you can box the cable in below the beam and protect it, there is no danger of the cable inside the boxed area, it is the same as running through the framing members and behind the walls.
Here is the code section:
12-518 Protection for cable in exposed installations
Cable used in exposed wiring shall be adequately protected against mechanical damage where it passes through
a floor, where it is less than 1.5 m above a floor, or where it is exposed to mechanical damage.
In reality, the cable only being accessible by way of high ladders, there would not be exposure to mechanical damage under normal circumstances.
Although it may have a bad appearance and look much better boxed in to cover.