It isn't mandatory to backup the DB (or anything else for that matter) as part of an upgrade but it is highly recommended to do so. I would recommend you do the same here in case you run into any issues with the upgrade process.
I don't think it is mandatory to backup your PW but it is highly recommended. If you do not backup your PW and your upgrade does not go smoothly and you need to roll back, you could lose all of your old measure data. In situations like this, it is always best practice to backup your PW and session store.
See step 4: https://www.dynatrace.com/support/doc/appmon/installation/upgrade-and-migration-guide/upgrade-server-collectors-and-clients/