I've been using a app based timer since 2017 now, and while skeptical of it's accuracy at first (most phone's GPS are at 1hz, so precision of the phone is +/-1sec), I thought I'd give it a try. I have been very impressed. General accuracy is within 0.2s of the transponder time, and never worse than 0.4s. If you do want more accuracy, 50hz plug in GPS units for mobile phones can be found for under 50€ nowadays, but honestly, I've not seen any need.
As for which application, you are free to chose. I've used Racechrono, but there are plenty to chose from. I've tested Racechrono on a mix of phones, and found stable on Android 9 (Samsung A20), Android 7 (Wiko tommy 2) Android 4.4 (Samsung galaxy grand) and even 4.1 (Samsung galaxy trend lite). It didn't work on a very old Chinese phone running Android 2 but that was pushing my limits. There are also Apple options, but Julie won't yet let me mess with her old iphone 6, so I can't comment. Watch this space

Now, worth noting that the phone does not need a SIM card to work. Many applications will run off line so long as they are up to date. I put an old, inactive SIM card in, just to hide the messge from the screen, but it is not necessary. If you do want live updates, just to hook it to the shared wifi of your main phone, which you put in pocket inside your leathers.
Next, how to mount it. Well, it's an old phone, so you probably won't care too much about marking it, so the easiest option is to just take it's protective housing, and screw it to the bodywork somewhere. it works fine, just remember that you will want to take the phone out to charge it from time to time. The only real disadvantage here is weather protection. If you ride in the wet, your phone won't last long.
My solution has been to use bicycle mobile phone holders. I fix a small bit of tube to the bodywork, and then stick the mobile phone support on there.
In use, I find it's easiest to start the application well before heading out, just to remove the hassle of dealing with the phone at the last minute. It just means that your out lap will show as a 20mn or something, but who cares.
So, there you have it. No need to spend a fortune on an on board timer, like an Alfano, and in the event of a crash, you've lost nothing, just an old worthless phone.