I encountered this just the other day in Dokuwiki itself and reported it, its already addressed in the
master branch (see here), so if you want your main install to work with PHP8 switch to the master branch.
As for plugins I don't know how that is handled beyond the maintainers switching themselves and finding such errors. Or users giving them feedback and letting them know of the need to update their code. Could also make a PR to submit the changes if so inclined.