HTML5 IFRAME sandbox attribute seems to be exactly what we’re looking for. After some experiments I was able to come up with a way of placing all AdSense code in a sandboxed IFRAME which will limit some risks from the embedded third party code. This can get a bit tricky, especially with responsive AdSense snippets, as they need a way of determining their dimensions in relation to the main window.
While this may violate AdSense terms of service that explicitly forbid placing ads in IFRAME due to different forms of abuse, Google admits that there may be legitimate scenarios for their usage so you can ask for their authorisation on per-case basis. Since you can’t really contact them for approval before they tag your for alleged violation, I wouldn’t worry too much about that.
This is the code for a minimalistic HTML page creating IFRAME which then loads AdSense. Note the styling: the IFRAME is invisible, spanning to the whole width of the main window: