Until when is my device going to be supported? I got a MacBook Pro 13 inch, mid 2012 version. I would like to know if Apple does discontinue support (e.g. OS updates) for devices and if so, how I can find out what the max is going to be for my laptop.

I found the following: https://support.apple.com/en-us/HT201624

Does this mean that devices will be supported until they have been out of production for 5+ years?
Software updates are separate from hardware support. The page you referred to is purely hardware and how long you will be able to get replacement parts.

Software updates (i.e. macOS, iOS, Pages, Numbers, etc…) are subject to the hardware limitations and what hardware is needed in order for Apple to support that configuration. For example, my 2012 Mac Mini will run macOS Sierra, but it won't use the Apple Watch to unlock it because the version of BlueTooth in that Mac won't support that feature.

Every year when the new OS update is announced there is also the supported hardware list. This year's macOS update (10.13, High Sierra) will support all machines that were supported under last year's update (10.12, Sierra), but last year there were some machines that were not able to be updated from 10.11 to 10.12 (my Mac Pro can run 10.11, but not 10.12 or later).