I found something that works for now, but it’s a Flatpak container and containers are apparently not very safe. Therefore I will continue to use pyhanko.
Maybe it already works for you if you have a new enough Linux (version 21.01 of poppler). Otherwise, I followed the recommendation (https://cloudstore.zih.tu-dresden.de/index.php/s/j5BKKyJYZFBzGsB) that the most comfortable way is via flatpack (https://flathub.org/apps/details/org.kde.okular). I also tried building a container a little bit - unsuccessfully.
It works for me if I install a newer Okular via Flatpak:
1.) Install flatpak
Following https://flatpak.org/setup/Debian :
# apt install flatpak
# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
2.) Install Okular
More info and source: https://flathub.org/apps/details/org.kde.okular
# flatpak install flathub org.kde.okular
# flatpak run org.kde.okular
3.) Setting up the certificate database (with personal certificate)
Sources: https://docs.kde.org/stable5/en/okular/okular/signatures.html#adding_digital_signatures, https://docs.kde.org/stable5/en/okular/okular/configure-backends.html, https://docs.kde.org/stable5/en/okular/okular/config-pdf.html#config-pdf-digital-signatures):
(( This step in case signing still doesn’t work. ))
In Okular: Settings -> Configure Backends -> radio tick “Custom:” and select the location where the Firefox data database with digital certificate is located (in my case it works /home/username/.mozilla/firefox/gwn47hz7.default-esr).
4.) Signature
Tools -> Digitally sign… -> (asks me for Firefox’s ‘master password’ in other words) -> draw a square for signature -> select digital certificate -> name of signed file.