I was leaning toward not trying too hard

. I'm going to ignore the @page with an ID problem and leave that as a case that someone would need to fix by hand - though margins will still be removed in that case, they just wouldn't be added back based on the Calibre pref.
The question was also partially academic - if there is some way an ID can be assigned to a pseudo selector like @page I was curious to know about it.
edit:
The rest of the work comes out of integration with Quality check, and providing users a simple way to fix ADE page number rendering. You're correct that newer ADE renderers don't display the numbers - my 650 doesn't display them. But any users of older devices will still be affected, so I figured the extra effort wouldn't be unappreciated.