AdSense can provide responsive ads which change size depending on available space. AdSense also allows to provide backup ads to be displayed on page when Google has nothing to offer. Is there a way to have those ads responsive as well? I am guessing I should choose HTML page as an alternative and implement responsiveness on my own. But maybe there are some libraries or other resources which would help me with that?
I think you have half answered your own query. You need to create an html file. However, instead of implementing the responsiveness yourself, you can use any of the ad networks providing responsive ad code in the html e.g. buysellads provide responsive ads.
I am sure most of the better ad networks must be providing responsive ad code. However, if you want your own responsive ads, in that case you might need to implement responsiveness yourself or need to maintain your own ad-server.
I have not tried it but theoretically it should work.