I thought about this a few times but the flash storage is a bit sketchy for running a database, I am worried it can die. Tho android does have sqlite built in and works fine.
But the flash storage in a phone is going to be the eMMC variety which typically means a proper controller and TLC NAND. Not as robust probably as a "proper" SSD/NVME, but a lot more durable than most micro SD cards. And it'll have health indicators.
Also if your phone has SD card slot you can try "industrial" SD cards. They are small in capacity but ideal for write load.
You can also just insert an SD card to do the write-heavy operations and swap it out when it wears out (you make backups, right? :D)