The amount of information you give away is not very safe..
That's a good point. I know that I trust YNAB with this but I pay them for their service and they promise that that's the only way they make money. That's a trade-off I am willing to make to use their service.
I tried to write something like YNAB myself in the past (even using YNAB as a reference implementation) but I had to accept that my time is better spent elsewhere. I also self-hosted Firefly III in the past but it's not as good as YNAB.
You can do the same without giving away your consumer habits and info being sold to banks and insurance
How? And afaik, my info is not getting sold to other banks and insurance. My current bank already knows my financial transactions.