VictoriaMetrics or other long term stats

Is there any easy step by step guide on how to enable long term stats in HA? Questions I would like to get answered are for example: how many times a day on average I have opened my garage door during last year or how long during the day is the washing machine used.

So far I tried installing influxdb integration with VictoriaMetrics addon. However the results are not spectacular, most likely due to me not understanding how it is supposed to work together. So on a technical level a few questions come to mind:

  1. Which TS DB should I choose? InfluxDB, Victoria Metrics, Prometheus, or anything else? IIRC then I tried InfluxDB it was using some old version with not very flexible query language (plus documentation was lacking).
  2. How does info about entity states flow between HA and TS DB? Should I use influxdb or prometheus integration which will make HA push the entity states to the TS DB? Or should it be another way round: the TS DB should connect to HA to get entity states? (that’s how I understand scrape_configs in prometheus integration)
  3. How do I verify that the connection is working fine?
  4. How should the time series look in db? Right now I am getting timeseries containing values for some timestamps, but not for others (even if I know the HA was running fine at that time). For a simple switch I would expect value 0 or 1, but what I get is 0 or nothing. Maybe I don’t get it, but this is not very intuitive for querying.
  5. How do I connect to the TS DB. I know about Graphana, are there any other options for beginners?