https://www.fide.com/FIDE/handbook/Anti%20Cheating%20Guideli...
11.3.b. During play, a player is forbidden to have a mobile phone and/or other device capable of processing or transmitting chess analysis in the playing venue. If it is evident that a player brought such a device into the playing venue, he shall lose the game. The opponent shall win. The rules of a competition may specify a different, less severe, penalty.
I'd also imagine that this rule's enforcement would be relaxed when, for instance, a player sets up a phone to record the game and has no access to that phone during the game, since any information the phone is recording (and any resulting processing for cheating) would be inaccessible to the user during the game.
I guess this may vary by country, but at least in the USA, phones have been banned in every "novice" tournament that I've participated in. Even books are off limits.
FIDE (and anything under FIDE rules) does certify some purpose built digital recording devices, they are hilariously expensive and hilariously crap but they exist.
* https://www.monroi.com/products/personal-chess-manager.html
The USCF certification requirements are here [2]. This also includes a list of USCF certified electronic scoresheets.
[1] https://www.fide.com/FIDE/handbook/Standards_of_Chess_Equipm...
[2] https://www.uschess.org/docs/gov/reports/eScoresheets/Certif...
I like ChessNoteR almost as much, and it's USCF-approved. Not FIDE-approved yet, but they're working on it.
This enables you to record and replace moves (including helping forecasting moves).
If everyone used these devices, then problem solved.
But I've only see someone using it once. Good chess players tend to already be good at visualizing past, present, and future positions.