MariaDB: Why is this still using temporary and filesort - is it because I'm using a self-join? How to fix?
Try to convert your query to
SELECT e2.personId, COUNT(*) - SUM(e2.personId = e1.personId)
FROM entries e1
JOIN entries e2 USING (categoryId)
WHERE e1.personId  =  1
GROUP BY e2.personId


Update
It seems that MariaDB uses implicit STRAIGHT_JOIN... or plan builder cannot optimize the query correctly.
For query optimize it's enough to swap table copies. See fiddle for details.